mirror of
https://github.com/tlsnotary/tlsn.git
synced 2026-01-09 14:48:13 -05:00
Fix wasm-pack warnings (#888)
This commit is contained in:
@@ -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" }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user