Files
zeekay b7d115a665 fix: resolve getrandom WASM compilation for wasm32 target
Two issues prevented wasm32-unknown-unknown builds:

1. getrandom 0.3.4 (transitive via candle -> rand 0.9 -> rand_core 0.9)
   removed the implicit WASM backend. Add getrandom 0.3 with wasm_js
   feature as a direct dep to enable JS-based randomness for the
   transitive copy.

2. tokenizers inherited the workspace "onig" feature, pulling in
   onig_sys (C library) which cannot cross-compile for wasm32.
   Override tokenizers to use only "unstable_wasm" without "onig".
2026-02-24 23:25:25 -08:00

31 lines
995 B
TOML

[package]
name = "hanzo-edge-wasm"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Hanzo Edge WebAssembly — run AI models in the browser"
homepage = "https://edge.hanzo.ai"
keywords = ["ai", "inference", "edge", "llm", "gguf"]
categories = ["science", "command-line-utilities"]
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
candle-core = { workspace = true }
candle-nn = { workspace = true }
candle-transformers = { workspace = true }
tokenizers = { version = "0.20", default-features = false, features = ["unstable_wasm"] }
serde = { workspace = true }
serde_json = { workspace = true }
anyhow = { workspace = true }
wasm-bindgen = "0.2"
js-sys = "0.3"
web-sys = { version = "0.3", features = ["console"] }
serde-wasm-bindgen = "0.6"
getrandom = { version = "0.2", features = ["js"] }
getrandom_03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
rand = "0.8"
console_error_panic_hook = "0.1"