The generated crate already provides what this tier existed to build:
CBOR marshalling, the callback dance, and a typed method per proc. So
macros.rs (trampoline, handle_ffi_call) and libwaku_response.rs
(RET_OK/RET_ERR, LibwakuResponse) are deleted rather than ported, and
node/events.rs goes with them -- its WakuEvent enum is now one generated
payload struct per event, which is what the typed listeners hand back.
What survives is what the generated crate does not give us: the domain
layer (WakuMessage, WakuContentTopic, MessageHash, pubsubtopic) and
WakuNodeConfig, which still serialises to the JSON create_node takes --
that JSON is unchanged, only its transport moved to CBOR.
BREAKING CHANGE: WakuNodeHandle and its Initialized/Running typestate,
waku_new, and waku_destroy are gone; callers use LogosDeliveryCtx::create
and let Drop tear the node down. set_event_callback is gone too: events
are per-name now, so a whole-stream callback has no equivalent -- use the
typed add_on_*_listener methods, which deliver a payload struct instead
of a JSON string to match on.
Tests and the example move with the API. The event handling gets shorter
rather than longer: no from_str, no matching five variants, no panicking
on Unrecognized -- a listener only receives the event it registered for.
Callers now base64-decode payloads themselves, since that was WakuMessage's
serde doing it before.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* bump nwaku to the current master branch ( commit: 625c8ee5 )
* make the waku crate to behave tokio-asynchronously
* use of store
* use of lightpush and filter
* add waku-bindings/src/general/messagehash.rs
* add waku-bindings/src/general/time.rs
* add waku-bindings/src/general/waku_decode.rs
* add WakuEvent management (WakuMessage, ConnectionChange, TopicHealthChange.)
* add waku-bindings/src/macros.rs
* update nwaku vendor to v0.33.1
* build.rs: add negentropy dependency and cmdCount cmdLine dependencies
* fix: call waku_setup when instantiating waku_new
* Properly decode a Vec<Multiaddr>
* First commit tic-tac-toe
* adding some simple game logic to coordinate the turns a little
* some logic to panic if a proper event callback hasn't been set
* restoring back the type state pattern introduced by Richard
* new PubsubTopic type
* fix clippy issues
---------
Co-authored-by: Richard Ramos <info@richardramos.me>
- removes encoding functions from relay and lightpush
- adds `encode_symmetric` and `encode_asymmetric` to `WakuMessage`
- don't panic when unserializing json
* Update vendor
* Expose local archive query
Update to beta4
* Update bindings package to beta4
* Update bindings package to beta4
* Make store response fields public
* Added store configuration
* Use decode response function
* Fix for codecov branch names
* Codecov with all tests included
* Add tokio to node tests
* Run echo tests as seperate processes
* Add token to evade GH limiter
* Discv5 and default test for node
* Pipe protocol id
* Fix peer id connect
* Fix WakuPubSubTopic parsing
* Use optional timeout on publish messages
* More test cases
* Update vendor
* Use connect with peer_id
* Fix signal -> event -> message deserialization
* Actively wait for result to arrive the test node
* Clippy happy
* Clippy happy on tests
* Cleaning and adjusting types
* Updated vendor
* Fix keys dance
* Fix lightpush
* Add disconnect test
* Ignore node test for CI
* Add gcc on gh actions
* Reverse installing gcc
* Bring back gcc just for ubuntu and windows
* Removed rust-crypto unused dependency
* Clippy happy
* Add modules
* Implemented waku config struct
* Implemented waku management functions
* Use optional config in waku_new
* Added config docs
* Fix tests
* Dbg error on gh actions
* Added fail result to dbg
* Removed gh actions dbg
* NodeConfig -> WakuNodeConfig
* Removed duplicated test
* Implemented safety layer on top of node
* Add exclusive running test
* Use static instead of const for global flag
* Do not allow for double initialization
* Update submodule to latest master commit with responses fixes
* Merge tests
* Added JsonResponse type
* Add dependencies
* Added wakumessage
* Adjust go build to link with missing simbols on osx
* Added general types
* Nitpick in docs