Files
rustytorch/crates/production/rtx-wasm-inference/Cargo.toml
T
2026-03-04 00:08:42 +00:00

68 lines
1.5 KiB
TOML

[package]
name = "rtx-wasm-inference"
version = "1.0.0"
edition = "2024"
description = "WebAssembly inference runtime for RustyTorch++ - browser and Node.js deployment"
license = "Apache-2.0"
repository = "https://github.com/osobh/rustytorch"
keywords = ["wasm", "webassembly", "inference", "machine-learning", "browser"]
categories = ["wasm", "science", "mathematics"]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["console_error_panic_hook"]
# Enable SIMD operations (requires WASM SIMD support)
simd = []
# Enable threading (requires SharedArrayBuffer)
threads = []
# Enable streaming inference
streaming = []
[dependencies]
# Core WASM bindings
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
web-sys = { version = "0.3", features = [
"console",
"Performance",
"Window",
"Navigator",
"WorkerGlobalScope",
] }
# Error handling in WASM
console_error_panic_hook = { version = "0.1", optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-wasm-bindgen = "0.6"
# Async runtime for WASM
futures = "0.3"
# Random number generation (WASM-compatible)
getrandom = { version = "0.3", features = ["wasm_js"] }
rand = "0.9"
# Logging
tracing = "0.1"
[dev-dependencies]
wasm-bindgen-test = "0.3"
[profile.release]
# Optimize for size in WASM
opt-level = "s"
lto = true
# Package metadata for wasm-pack
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Os", "--enable-simd"]
[lints]
workspace = true