Files
wickra/bindings/wasm/Cargo.toml
T
kingchenc 1295b63e1f Wire release pipeline to crates.io, PyPI, and npm
On every v* tag push the release workflow now publishes the project to
all three public registries in parallel:

- crates.io: wickra-core then wickra-data then wickra, with a 45-second
  sleep between each so the registry index can refresh before the next
  publish step asserts the previous version is available.

- PyPI: maturin-action builds wheels for Linux x86_64 + aarch64, macOS
  x86_64 + aarch64, and Windows x64, plus an sdist; all artefacts upload
  to PyPI via MATURIN_PYPI_TOKEN.

- npm: napi-rs builds a native binary per platform (linux-x64-gnu,
  darwin-x64, darwin-arm64, win32-x64-msvc), publishes each as its own
  platform package, then publishes the main `wickra` meta-package
  that resolves to the right platform at install time.

- WASM: wasm-pack builds the bundler-target package and publishes it as
  `wickra-wasm` on npm, with the auto-generated package.json enriched
  with the author/repo/license metadata.

Package metadata was unified so all targets point at kingchenc/wickra
on GitHub; the Node binding is now plain `wickra` (the @wickra/ scope
was unnecessary because the bare name was free). README install table
updated to match.
2026-05-21 20:35:18 +02:00

56 lines
1.7 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.wasm-bindgen]
debug-js-glue = false
demangle-name-section = true
dwarf-debug-info = false
[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',
]