@rindle/wasm 0.3.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.sh +7 -4
- package/package.json +2 -2
- package/pkg/rindle_bg.wasm +0 -0
package/build.sh
CHANGED
|
@@ -15,11 +15,14 @@ PROFILE="${1:-wasm-release}"
|
|
|
15
15
|
TARGET=wasm32-unknown-unknown
|
|
16
16
|
FEATURES=wasm
|
|
17
17
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
18
|
+
# The Cargo workspace lives under rust/; the wasm artifact ships into this JS package's pkg/ (which
|
|
19
|
+
# stays at the repo root). Build from rust/ so `-p rindle` and target/ resolve; emit into packages/wasm/pkg.
|
|
20
|
+
RUST_ROOT="$ROOT/rust"
|
|
18
21
|
OUT="${RINDLE_WASM_OUT:-$ROOT/packages/wasm/pkg}"
|
|
19
22
|
BINDGEN_TARGET="${RINDLE_WASM_BINDGEN_TARGET:-web}"
|
|
20
23
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
21
24
|
|
|
22
|
-
cd "$
|
|
25
|
+
cd "$RUST_ROOT"
|
|
23
26
|
|
|
24
27
|
# `-p rindle`: build ONLY the C-toolchain-free core crate for wasm32 — not the whole workspace
|
|
25
28
|
# (the SQLite members `rindle-sqlite`/`rindle-replica` and `rindle-fuzz`'s `getrandom` don't compile to
|
|
@@ -29,9 +32,9 @@ cd "$ROOT"
|
|
|
29
32
|
# don't emit a colliding `librindle.so`, cargo#6313); the `.wasm` artifact needs `cdylib`, requested
|
|
30
33
|
# here just for this wasm32 build. Produces `target/$TARGET/<profile>/rindle.wasm` either way.
|
|
31
34
|
case "$PROFILE" in
|
|
32
|
-
dev) cargo rustc -p rindle --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$
|
|
33
|
-
release) cargo rustc -p rindle --release --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$
|
|
34
|
-
*) cargo rustc -p rindle --profile "$PROFILE" --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$
|
|
35
|
+
dev) cargo rustc -p rindle --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$RUST_ROOT/target/$TARGET/debug/rindle.wasm" ;;
|
|
36
|
+
release) cargo rustc -p rindle --release --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$RUST_ROOT/target/$TARGET/release/rindle.wasm" ;;
|
|
37
|
+
*) cargo rustc -p rindle --profile "$PROFILE" --target "$TARGET" --no-default-features --features "$FEATURES" --crate-type cdylib; WASM="$RUST_ROOT/target/$TARGET/$PROFILE/rindle.wasm" ;;
|
|
35
38
|
esac
|
|
36
39
|
|
|
37
40
|
wasm-bindgen --target "$BINDGEN_TARGET" --out-dir "$OUT" --out-name rindle "$WASM"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindle/wasm",
|
|
3
|
-
"version": "0.3
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@rindle/client": "0.3
|
|
32
|
+
"@rindle/client": "0.4.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.10.0",
|
package/pkg/rindle_bg.wasm
CHANGED
|
Binary file
|