mirror of
https://github.com/hanzoai/edge.git
synced 2026-10-30 18:38:12 +00:00
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".
31 lines
995 B
TOML
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"
|