diff --git a/examples/cbindings/waku_example.c b/examples/cbindings/waku_example.c index 997b7ad0ad..d6a0cbc7d3 100644 --- a/examples/cbindings/waku_example.c +++ b/examples/cbindings/waku_example.c @@ -290,8 +290,6 @@ void handle_user_input() { // End of UI program logic int main(int argc, char** argv) { - waku_setup(); - struct ConfigNode cfgNode; // default values snprintf(cfgNode.host, 128, "0.0.0.0"); diff --git a/examples/cpp/waku.cpp b/examples/cpp/waku.cpp index 8b544160a9..4b601c492a 100644 --- a/examples/cpp/waku.cpp +++ b/examples/cpp/waku.cpp @@ -199,8 +199,6 @@ auto cify(F&& f) { } int main(int argc, char** argv) { - waku_setup(); - struct ConfigNode cfgNode; // default values snprintf(cfgNode.host, 128, "0.0.0.0"); diff --git a/examples/golang/waku.go b/examples/golang/waku.go index c7a6a2cc64..ad7c40b345 100644 --- a/examples/golang/waku.go +++ b/examples/golang/waku.go @@ -296,10 +296,6 @@ type WakuNode struct { ctx unsafe.Pointer } -func WakuSetup() { - C.waku_setup() -} - func WakuNew(config WakuConfig) (*WakuNode, error) { jsonConfig, err := json.Marshal(config) if err != nil { @@ -557,8 +553,6 @@ func (self *WakuNode) WakuGetMyENR() (string, error) { } func main() { - WakuSetup() - config := WakuConfig{ Host: "0.0.0.0", Port: 30304, diff --git a/examples/mobile/android/app/src/main/jni/waku_ffi.c b/examples/mobile/android/app/src/main/jni/waku_ffi.c index 129ebaa08b..477e2dad24 100644 --- a/examples/mobile/android/app/src/main/jni/waku_ffi.c +++ b/examples/mobile/android/app/src/main/jni/waku_ffi.c @@ -177,7 +177,6 @@ jclass loadClass(JNIEnv *env, const char *className) { } void Java_com_mobile_WakuModule_wakuSetup(JNIEnv *env, jobject thiz) { - waku_setup(); LOGD("log example for debugging purposes...") } diff --git a/examples/python/waku.py b/examples/python/waku.py index 1c6ed7bc73..4d5f5643e5 100644 --- a/examples/python/waku.py +++ b/examples/python/waku.py @@ -58,9 +58,6 @@ def call_waku(func): callback_type = ctypes.CFUNCTYPE(None, ctypes.c_int, ctypes.c_char_p, ctypes.c_size_t) -# libwaku setup -libwaku.waku_setup() - # Node creation libwaku.waku_new.restype = ctypes.c_void_p libwaku.waku_new.argtypes = [ctypes.c_char_p, diff --git a/examples/rust/src/main.rs b/examples/rust/src/main.rs index 6e8b9c1c95..7a91b0ddc4 100644 --- a/examples/rust/src/main.rs +++ b/examples/rust/src/main.rs @@ -13,8 +13,6 @@ pub type WakuCallback = ); extern "C" { - pub fn waku_setup(); - pub fn waku_new( config_json: *const u8, cb: WakuCallback, @@ -70,8 +68,6 @@ fn main() { }"; unsafe { - waku_setup(); - // Create the waku node let closure = |ret: i32, data: &str| { println!("Ret {ret}. Error creating waku node {data}"); diff --git a/library/libwaku.h b/library/libwaku.h index 6a5800d80f..53919d160e 100644 --- a/library/libwaku.h +++ b/library/libwaku.h @@ -20,9 +20,6 @@ extern "C" { typedef void (*WakuCallBack) (int callerRet, const char* msg, size_t len, void* userData); -// Initializes the library. Should be called before any other function -void waku_setup(); - // Creates a new instance of the waku node. // Sets up the waku node from the given configuration. // Returns a pointer to the Context needed by the rest of the API functions. diff --git a/library/libwaku.nim b/library/libwaku.nim index c0e9f2487d..a397aa51cd 100644 --- a/library/libwaku.nim +++ b/library/libwaku.nim @@ -117,9 +117,6 @@ proc initializeLibrary() {.exported.} = ################################################################################ ### Exported procs -proc waku_setup() {.dynlib, exportc.} = - NimMain() - initializeLibrary() proc waku_new( configJson: cstring, callback: WakuCallback, userData: pointer