Skip to content

Commit b8c29da

Browse files
authored
Feat/wasm version (#12)
* WASM SDK port and CI updates * Improve README readebility * Local deps cleanup * Cleanup stage files * Port hodl to wasm * Imrove wasm md * Fix flaky test * Sync with latest dev * Add wasm artifacts jib * Add hodl invoices * Add nia asste wasm example * Move rgb assets methods to rln level * Split proxe to separate service * Add wasm compose * Extend tests * Stabilyze wasm e2e flow * Update submodule * Fix warnings * Fix kotlin e2e * Channel persistence * Implement wasm rust lightning * Implement wasm rust-lightning * Fix build * Fix wasm build * Fix wasm tests * Revert core changes
1 parent f3e6d98 commit b8c29da

86 files changed

Lines changed: 42754 additions & 44 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- uses: actions-rust-lang/setup-rust-toolchain@v1
2525
with:
2626
rustflags: ""
27+
# Needed by the `wasm-without-vls` mode, which runs `cargo check --target
28+
# wasm32-unknown-unknown` against the wasm-sdk crate.
29+
target: wasm32-unknown-unknown
2730
- name: Run feature-matrix checks
2831
run: |
2932
set -euo pipefail
@@ -35,10 +38,13 @@ jobs:
3538
cargo test --features "uniffi,vls" --lib 'signer::in_process_transport::tests::' -- --test-threads=1
3639
elif [ "${{ matrix.mode }}" = "wasm-without-vls" ]; then
3740
# WASM SDK crate is tracked in a separate workspace/repo path in current layout.
38-
# Keep this gate explicit and non-VLS by requiring no `vls` feature.
41+
# It never pulls VLS, so this gate is inherently non-VLS.
3942
cargo check --no-default-features -p uniffi-bindgen --manifest-path bindings/uniffi-bindgen/Cargo.toml
4043
if [ -f bindings/wasm-sdk/Cargo.toml ]; then
41-
cargo check --target wasm32-unknown-unknown --no-default-features --manifest-path bindings/wasm-sdk/Cargo.toml
44+
# Build with default features: `real-wasm-rgb` is the crate's whole purpose and
45+
# enables `lightning/rgb-wasm`. With `--no-default-features` the rust-lightning RGB
46+
# backend code fails to compile, and the crate has no `vls` feature to exclude anyway.
47+
cargo check --target wasm32-unknown-unknown --manifest-path bindings/wasm-sdk/Cargo.toml
4248
else
4349
echo "bindings/wasm-sdk/Cargo.toml not found; skipping direct wasm-sdk cargo check in this repository layout"
4450
fi
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: WASM Artifacts
2+
3+
on:
4+
push:
5+
branches: [ "master", "dev", "stage" ]
6+
pull_request:
7+
branches: [ "master", "dev", "stage" ]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
wasm-sdk-package:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 45
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: true
21+
- uses: actions-rust-lang/setup-rust-toolchain@v1
22+
with:
23+
rustflags: ""
24+
- name: Add wasm32 target
25+
run: rustup target add wasm32-unknown-unknown
26+
- name: Install wasm-pack
27+
run: cargo install wasm-pack --locked
28+
- name: Build wasm-sdk package (web target)
29+
run: |
30+
cd bindings/wasm-sdk
31+
wasm-pack build --target web --release --out-dir pkg
32+
- name: Upload wasm-sdk pkg artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: rln-wasm-sdk-pkg
36+
path: bindings/wasm-sdk/pkg
37+
if-no-files-found: error

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,15 @@
3333
/bindings/python/rgb_lightning_node.py
3434
/artifacts
3535
/bindings/python/build
36+
/bindings/wasm-sdk/target
3637
/sdkdata_py
38+
39+
# Local E2E artifacts (generated by scripts/Playwright)
40+
.e2e-artifacts/
41+
.e2e-regular-rln-datadir/
42+
43+
# JS / Playwright installs and outputs
44+
node_modules/
45+
e2e-specs/node_modules/
46+
test-results/
47+
e2e-specs/test-results/

0 commit comments

Comments
 (0)