Skip to content

Commit 4a527e6

Browse files
authored
0.0.2 updates (#2)
* 0.0.2 updates * make pnpm install work * remove rust-toolchain files that mess up CI * remove txtpp verify in workflow * update required -C flags
1 parent ec53905 commit 4a527e6

22 files changed

Lines changed: 1270 additions & 1951 deletions

.cargo/config.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
target = "wasm32-unknown-unknown"
33

44
[target.wasm32-unknown-unknown]
5-
rustflags = ["-C", "target-feature=+atomics,+bulk-memory,+mutable-globals"]
5+
rustflags = ["-C", "target-feature=+atomics"]
66
# Ciantic: Tested +simd128 22.7.2021, didn't work! Got some wasm-opt problems.
7-
# 10.01.2024 - It now works, but threading works without it. So probably best to wait for it to stabilize.
7+
# 2024-10-01 - It now works, but threading works without it. So probably best to wait for it to stabilize.
8+
# 2025-06-12 - mutable-globals is enabled by default, and bulk-memory is enabled by default on Rust 1.87+
89

910
[unstable]
1011
build-std = ["panic_abort", "std"]

.github/workflows/build.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,21 @@ jobs:
1212
name: Example
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: arduino/setup-task@v2
15+
- uses: Pistonight/mono-dev/actions/setup@main
1716
with:
18-
version: 3.x
19-
repo-token: ${{ secrets.GITHUB_TOKEN }}
20-
- uses: actions/setup-node@v4
21-
with:
22-
node-version: 18.x
23-
- uses: dtolnay/rust-toolchain@nightly
24-
with:
25-
targets: wasm32-unknown-unknown
26-
components: rust-src
27-
- uses: cargo-bins/cargo-binstall@main
28-
- run: cargo binstall --no-confirm wasm-pack
29-
- run: npm ci
30-
working-directory: example
31-
- run: npm run wasm
17+
mono-dev: true
18+
ecma-pnpm: true
19+
ecma-bun: true
20+
rust: nightly
21+
rust-wasm: true
22+
rust-src: true
23+
tool-cargo-binstall: txtpp
24+
- run: task install-ci
3225
working-directory: example
33-
- run: npm run build
26+
- run: task build
3427
working-directory: example
3528
- uses: actions/upload-artifact@v4
3629
with:
3730
path: example/dist
3831
name: example
39-
retention-days: 3
32+
retention-days: 3

.github/workflows/check.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ jobs:
1212
name: Check
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: arduino/setup-task@v2
15+
- uses: Pistonight/mono-dev/actions/setup@main
1716
with:
18-
version: 3.x
19-
repo-token: ${{ secrets.GITHUB_TOKEN }}
20-
- uses: actions/setup-node@v4
21-
with:
22-
node-version: 18.x
23-
- uses: dtolnay/rust-toolchain@nightly
24-
with:
25-
targets: wasm32-unknown-unknown
26-
components: clippy,rust-src,rustfmt
27-
- uses: cargo-bins/cargo-binstall@main
28-
- run: cargo-binstall --no-confirm txtpp
29-
- run: npm ci
30-
- run: task check
17+
mono-dev: true
18+
ecma-pnpm: true
19+
ecma-bun: true
20+
rust: nightly
21+
rust-wasm: true
22+
rust-src: true
23+
tool-cargo-binstall: txtpp
24+
- run: task check

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/Cargo.lock
44
*.min.js
55
!/src/js/createDispatcher.min.js
6+
/mono-dev
7+
rust-toolchain

Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wasm-bindgen-spawn"
3-
version = "0.0.1"
4-
edition = "2021"
3+
version = "0.0.2"
4+
edition = "2024"
55
description = "Web Worker Multithreading library for wasm-bindgen the uses shared memory"
66
repository = "https://github.com/Pistonite/wasm-bindgen-spawn"
77
license = "MIT"
@@ -20,11 +20,12 @@ include = [
2020
]
2121

2222
[dependencies]
23-
js-sys = "0.3.70"
24-
oneshot = { version = "0.1.8", default-features = false, features = ["std"] }
25-
thiserror = "1.0.64"
26-
wasm-bindgen = "0.2.93"
27-
wasm-bindgen-futures = { version = "0.4.43", optional = true }
23+
js-sys = "0.3.77"
24+
oneshot = { version = "0.1.11", default-features = false, features = ["std"] }
25+
static_assertions = "1.1.0"
26+
thiserror = "2.0.12"
27+
wasm-bindgen = "0.2.100"
28+
wasm-bindgen-futures = { version = "0.4.50", optional = true }
2829

2930
[features]
3031
default = ["async"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Pistonight
3+
Copyright (c) 2025 Pistonight
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ Read the full article for more details on the implications of Cross-Origin Isola
6161
2. Add the following to `.cargo/config.toml`
6262
```toml
6363
[target.wasm32-unknown-unknown]
64-
rustflags = ["-C", "target-feature=+atomics,+bulk-memory,+mutable-globals"]
64+
rustflags = ["-C", "target-feature=+atomics"]
65+
# You also need `bulk-memory` for Rust < 1.87. For 1.87+ it's enabled by default
66+
# rustflags = ["-C", "target-feature=+atomics,+bulk-memory"]
6567
6668
[unstable]
6769
build-std = ["panic_abort", "std"]

Taskfile.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,37 @@ includes:
66
taskfile: ./example
77
dir: ./example
88

9+
cargo:
10+
taskfile: ./mono-dev/task/cargo.yaml
11+
internal: true
912

1013
tasks:
14+
install-cargo-extra-tools:
15+
aliases: [icets]
16+
cmds:
17+
- cargo install txtpp
18+
19+
install:
20+
cmds:
21+
- rm -rf mono-dev
22+
- git clone https://github.com/Pistonight/mono-dev --depth 1
23+
- echo "nightly" > example/rust-toolchain
24+
- echo "nightly" > rust-toolchain
25+
1126
build:
1227
desc: Incrementally dev build
1328
cmds:
1429
- txtpp src/js/createDispatcher.min.js
15-
- cd example && npm run wasm
30+
- cd example && pnpm run wasm
1631

1732
check:
1833
desc: Check for issues
1934
cmds:
20-
- cargo clippy --all-features --all-targets -- -D warnings -D clippy::todo
21-
- cargo fmt --check
22-
- task: prettier
23-
vars:
24-
PRETTIER_ARGS: --check
25-
- task: ex:check
35+
- task: cargo:clippy-all
36+
- task: cargo:fmt-check
2637

2738
fix:
2839
desc: Fix issues
2940
cmds:
30-
- cargo fmt
31-
- task: prettier
32-
vars:
33-
PRETTIER_ARGS: --write
41+
- task: cargo:fmt-fix
3442
- txtpp src -r
35-
- task: ex:fix
36-
37-
prettier:
38-
cmds:
39-
- npx prettier "./src/js/*.js" --tab-width 4 --end-of-line auto {{.PRETTIER_ARGS}}
40-
41-

0 commit comments

Comments
 (0)