Fix wasm-pack warnings (#888)

This commit is contained in:
Hendrik Eeckhaut
2025-06-03 22:38:54 +02:00
committed by GitHub
parent c0e084c1ca
commit 24e10d664f
5 changed files with 8 additions and 14 deletions

View File

@@ -44,6 +44,12 @@ resolver = "2"
inherits = "release"
opt-level = 1
[profile.release.package."tlsn-wasm"]
opt-level = "z"
[profile.dev.package."tlsn-wasm"]
debug = false
[workspace.dependencies]
notary-client = { path = "crates/notary/client" }
notary-common = { path = "crates/notary/common" }

View File

@@ -28,8 +28,3 @@ web-time = { workspace = true }
ws_stream_wasm = { version = "0.7.4", git = "https://github.com/tlsnotary/ws_stream_wasm", rev = "2ed12aad9f0236e5321f577672f309920b2aef51", features = [
"tokio_io",
] }
[package.metadata.wasm-pack.profile.release]
# Note: these wasm-pack options should match those in crates/wasm/Cargo.toml
opt-level = "z"
wasm-opt = true

View File

@@ -5,5 +5,5 @@ cd "$(dirname "$0")"
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--max-memory=4294967296 --cfg getrandom_backend="wasm_js"' \
rustup run nightly \
wasm-pack build ../wasm --target web --no-pack --out-dir=../wasm-test-runner/static/generated -- -Zbuild-std=panic_abort,std --features test,no-bundler &&
wasm-pack build ../wasm --release --target web --no-pack --out-dir=../wasm-test-runner/static/generated -- -Zbuild-std=panic_abort,std --features test,no-bundler &&
RUST_LOG=debug cargo run --release

View File

@@ -14,13 +14,6 @@ workspace = true
[lib]
crate-type = ["cdylib", "rlib"]
[package.metadata.wasm-pack.profile.debug]
debug = false
[package.metadata.wasm-pack.profile.release]
opt-level = "z"
wasm-opt = true
[features]
default = []
test = []

View File

@@ -9,7 +9,7 @@ set -e
rm -rf pkg
# Build tlsn_wasm package
wasm-pack build --target web .
wasm-pack build --release --target web .
# Patch tlsn_wasm.js import in spawn.js snippet and copy it to the main folder
file=$(find ./pkg/snippets -name "spawn.js" -print -quit)