Two unrelated failures in the post-release CI run: - Python jobs: `maturin develop` requires an activated virtualenv on CI runners that don't have a system Python set up that way. Switch to `maturin build --release --out dist` followed by `pip install --find-links dist`, which is venv-agnostic and OS-portable. - WASM job: the wasm-opt bundled with wasm-pack is older than the WASM features rustc 1.92 enables by default. The fix is to opt every feature in explicitly via the package metadata — reference-types, multivalue, bulk-memory, sign-ext, mutable-globals, nontrapping-float-to-int — so wasm-opt accepts the input. Same code as before; only the build steps and the wasm-opt config changed.
51 lines
1.5 KiB
TOML
51 lines
1.5 KiB
TOML
[package]
|
|
name = "wickra-wasm"
|
|
description = "WASM bindings for the Wickra streaming-first technical indicators library."
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
homepage.workspace = true
|
|
readme.workspace = true
|
|
keywords.workspace = true
|
|
categories.workspace = true
|
|
publish = false
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
# WASM target cannot use rayon (no threads in the browser by default), so we
|
|
# depend on the local path directly with default features disabled. This also
|
|
# strips the parallel batch helpers we don't ship to JavaScript.
|
|
wickra-core = { path = "../../crates/wickra-core", default-features = false }
|
|
wasm-bindgen = "0.2"
|
|
js-sys = "0.3"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde-wasm-bindgen = "0.6"
|
|
console_error_panic_hook = { version = "0.1", optional = true }
|
|
|
|
[features]
|
|
default = []
|
|
panic-hook = ["dep:console_error_panic_hook"]
|
|
|
|
[package.metadata.wasm-pack.profile.release]
|
|
# The wasm-opt that ships with wasm-pack is older than the WebAssembly
|
|
# features rustc enables by default (reference-types, multivalue,
|
|
# bulk-memory, sign-extension, mutable-globals, …). Listing them all keeps
|
|
# wasm-opt happy without requiring a binaryen upgrade in CI.
|
|
wasm-opt = [
|
|
'-O3',
|
|
'--enable-bulk-memory',
|
|
'--enable-mutable-globals',
|
|
'--enable-nontrapping-float-to-int',
|
|
'--enable-sign-ext',
|
|
'--enable-reference-types',
|
|
'--enable-multivalue',
|
|
]
|