Skip to content

Feat/wasm version#12

Open
rmn-boiko wants to merge 17 commits intoUTEXO-Protocol:devfrom
rmn-boiko:feat/wasm-version
Open

Feat/wasm version#12
rmn-boiko wants to merge 17 commits intoUTEXO-Protocol:devfrom
rmn-boiko:feat/wasm-version

Conversation

@rmn-boiko
Copy link
Copy Markdown
Collaborator

PR: WASM SDK implementation + parity/runtime refactor + CI integration

Overview

This branch introduces a full WASM SDK track for rgb-lightning-node, including runtime-backed endpoint behavior, wasm-focused architecture boundaries, contract coverage, examples, and CI integration.

Main changes

1) WASM SDK package and runtime

  • Added/expanded bindings/wasm-sdk as the standalone wasm-facing SDK package.
  • Implemented node/wallet/sdk façade surfaces and wasm runtime components:
    • LN runtime/event application
    • swap runtime
    • transport/session runtime
    • runtime state store + persistence hooks
  • Added dedicated test modules for runtime behavior and SDK contracts.

2) SDK-level refactor in core crate

  • Introduced SDK runtime abstraction layer in src/sdk/runtime.rs:
    • peer connectivity
    • channel peer store
    • LDK lifecycle
    • scheduler traits
  • Continued migration of SDK logic to SDK layer (src/sdk/*) to reduce coupling to route handlers and keep behavior portable across native/wasm surfaces.
  • Added wasm SDK boundary/bindings in core SDK path:
    • src/sdk/wasm.rs
    • src/sdk/wasm_bindings.rs

3) Build/target shaping for wasm

  • Updated target-aware dependency layout in root Cargo.toml:
    • native-only deps behind cfg(not(target_arch = "wasm32"))
    • wasm deps behind cfg(target_arch = "wasm32")
  • Updated src/lib.rs / src/main.rs target gating to keep native daemon path and wasm path cleanly separated.

4) Endpoint parity and contracts

  • Expanded runtime-backed endpoint implementation coverage in wasm SDK.
  • Added/maintained parity matrix and explicit error contract docs:
    • bindings/wasm-sdk/SDK_WASM_ENDPOINT_MATRIX.md
    • bindings/wasm-sdk/ERROR_CONTRACT.md
  • Documented explicit unsupported-by-design area:
    • issue_asset_uda (for now)

5) Examples

  • Added/updated browser interop/manual flow examples:
    • bindings/wasm-sdk/examples/wasm-interop/*
  • Added wasm flow equivalents to mirror SDK usage patterns from existing Python interop references.

6) CI

  • Added wasm checks to test workflow (.github/workflows/test.yaml):
    • wasm-sdk (crate check + test compile)
    • wasm-sdk-wasm32 (wasm32 target check)

Current status

  • bindings/wasm-sdk builds successfully for:
    • host check
    • wasm32-unknown-unknown check
  • CI now includes wasm pipeline coverage.
  • Remaining unsupported/modeled gaps are explicitly documented in endpoint/error docs.

@rmn-boiko rmn-boiko self-assigned this Apr 7, 2026
@rmn-boiko rmn-boiko force-pushed the feat/wasm-version branch from cbd9d22 to ccd1d50 Compare April 8, 2026 11:27
@rmn-boiko rmn-boiko marked this pull request as ready for review April 16, 2026 10:14
@rmn-boiko rmn-boiko force-pushed the feat/wasm-version branch 3 times, most recently from 9ea1adb to e539c86 Compare April 24, 2026 08:50
@rmn-boiko rmn-boiko force-pushed the feat/wasm-version branch 3 times, most recently from 1ce4cb1 to 4464e93 Compare April 24, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant