Skip to content

Commit 9736602

Browse files
authored
Merge pull request #142 from RGB-WG/v0.10
2 parents fa26de9 + 2ae8b79 commit 9736602

File tree

3 files changed

+108
-27
lines changed

3 files changed

+108
-27
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,18 @@ jobs:
2424
with:
2525
command: test
2626
args: --workspace --all-features --no-fail-fast
27+
wasm-testing:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Install rust nightly
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: nightly
35+
override: true
36+
- uses: Swatinem/rust-cache@v2
37+
- uses: jetli/[email protected]
38+
- name: Add wasm32 target
39+
run: rustup target add wasm32-unknown-unknown
40+
- name: Test in headless Chrome
41+
run: wasm-pack test --headless --chrome

Cargo.lock

Lines changed: 83 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ exclude = [".github"]
1515

1616
[lib]
1717
name = "rgb"
18+
crate-type = ["cdylib", "rlib"] # We need this for WASM
1819

1920
[dependencies]
20-
amplify = "~4.0.0-beta.15"
21+
amplify = "~4.0.0-beta.17"
2122
strict_encoding = "2.0.0-rc.1"
2223
strict_types = "1.0.0-beta.3"
2324
aluvm = { version = "0.10.0-alpha.1", features = ["strict_encoding"] }
@@ -42,6 +43,14 @@ serde = [
4243
"secp256k1-zkp/use-serde"
4344
]
4445

46+
[target.'cfg(target_arch = "wasm32")'.dependencies]
47+
wasm-bindgen = "0.2"
48+
rand = { version = "0.8.4", optional = true }
49+
getrandom = { version = "0.2", features = ["js"] }
50+
51+
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
52+
wasm-bindgen-test = "0.3"
53+
4554
[package.metadata.docs.rs]
4655
features = [ "all" ]
4756

0 commit comments

Comments
 (0)