mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-02 14:03:06 +00:00
C Sharp Example
Requirements
- git bash (which is installed as part of Git)
- chocolatey
- make
- mingw
- go
Running this example
These instructions should be executed in git bash:
# Clone the repository
git clone https://github.com/waku-org/go-waku.git
cd go-waku
# Build the .dll
make dynamic-library
# Copy the library into `libs/` folder
cp ./build/lib/libgowaku.* ./build/examples/waku-csharp/waku-csharp/libs/.
Open the solution waku-csharp.sln in Visual Studio and run the program.
Description
The following files are available:
Program.cscontains an example program which uses the waku libraryWaku.cs: file containing theWakunamespace with classes that allows you to instantiate a Go-Waku nodeWaku.Config: class used to configure the waku node when instantiationWaku.Node: waku node. The following methods are available:Node- constructor. Initializes a waku node. Receives an optionalWaku.ConfigStart- mounts all the waku2 protocolsStop- stops the waku nodePeerId- obtain the peer ID of the node.PeerCnt- obtain the number of connected peersListenAddresses- obtain the multiaddresses the node is listening to
Help wanted!
- Is it possible to build go-waku automatically by executing
make dynamic-libraryand copying the .dll automatically intolibs/in Visual Studio?