Add WASM-compatible WebSocket client abstraction #1615
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!1615
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/ws-support-wasm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Move WebSocket dependency (tokio-tungstenite) from cdk to cdk-http-client and introduce a platform-agnostic ws module with native (tokio-tungstenite) and WASM (ws_stream_wasm) backends. This enables WebSocket subscriptions on WASM targets, which were previously gated behind cfg(not(wasm32)).
Flatten wallet subscription module by merging ws.rs into subscription.rs now that the stream client is unconditionally compiled.
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingCan you please review this @thesimplekid ? I will follow up with a PR that would make this a trait (Http + websocket) to be passed around, deprecating the transport layer in the wallet for a generic transport layer that would be used project wise.
@ -0,0 +89,4 @@{} header(s) will be ignored.",headers.len());}Won't just discarding the header lead to difficult to debug errors specifically around auth? I don't think logging and just dropping is a good solution.
@ -0,0 +89,4 @@{} header(s) will be ignored.",headers.len());}@thesimplekid Can this be handled as part of https://github.com/cashubtc/cdk/issues/1682 and merge this as is?
@ -0,0 +89,4 @@{} header(s) will be ignored.",headers.len());}Sure, but need to make sure it is fixed before 0.16.