Files
yaak-mountain-loop/crates/yaak-wasm/Cargo.toml
T

42 lines
1.5 KiB
TOML

[package]
name = "yaak-wasm"
version = "0.1.0"
edition = "2024"
publish = false
# The desktop's model layer, compiled for a browser tab. See src/lib.rs.
#
# Building needs a clang with a WebAssembly backend: sqlite-wasm-rs compiles
# sqlite3.c to wasm at build time, and Apple's clang cannot target it. See
# build-wasm.cjs, which points cc at Homebrew LLVM when it is present.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false # Matches yaak-templates; wasm-opt has caused errors in CI
[lib]
crate-type = ["cdylib", "rlib"]
# The whole crate is `#![cfg(target_arch = "wasm32")]`: on a native target it
# is empty, so a workspace-wide `cargo test` neither builds SQLite's wasm shim
# for the host (which fails) nor links a browser-only runtime. Everything that
# only exists for wasm is a target-scoped dependency for the same reason.
[dependencies]
log = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
yaak-lifecycle = { workspace = true }
yaak-models = { workspace = true }
# No default features: the template exports belong to @yaakapp-internal/templates, not this module
yaak-templates = { path = "../yaak-templates", default-features = false }
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
js-sys = "0.3"
serde-wasm-bindgen = "0.6.5"
sqlite-wasm-rs = "0.5"
sqlite-wasm-vfs = "0.2"
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = ["console"] }