edgebert 0.2.0

Rust + WASM library for BERT inference on native and edge devices with no dependencies.
Documentation
[package]
name = "edgebert"
version = "0.2.0"
edition = "2024"
authors = ["Ólafur Aron Jóhannsson <olafurjohannss@gmail.com>"]
description = "Rust + WASM library for BERT inference on native and edge devices with no dependencies."
repository = "https://github.com/olafurjohannssson/edgebert"
license = "MIT"
keywords = ["bert", "nlp", "wasm", "transformer", "embeddings"]
categories = ["wasm", "text-processing", "encoding"]


[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
safetensors = "0.4"
wasm-bindgen = "0.2.100"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
openblas-src = { version = "0.10", features=["static"] }
ndarray = { version = "0.16.1", features=["rayon"] }
ndarray-linalg = { version = "0.17.0", features=["openblas-static"] }
tokenizers = { version = "0.15", default-features = false, features = ["onig"] }
rayon = "1.11.0"

[lib]
crate-type = ["cdylib", "rlib"] 

[target.'cfg(not(target_arch = "wasm32"))'.build-dependencies]
pkg-config = "0.3"



[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = ["console"] }
getrandom = { version = "0.2", features = ["js"] }
ndarray = "0.16.1"
console_error_panic_hook = "0.1.7"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true

[profile.bench]
inherits = "release"

[profile.dev-opt]
inherits = "dev"
opt-level = 2

[[bin]]
path = "large_text_benchmark.rs"
name = "large_text_benchmark"