mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-26 05:14:11 +02:00
Run the desktop's model layer in the browser (#557)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
[package]
|
||||
name = "yaak-web"
|
||||
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-models = { workspace = true }
|
||||
|
||||
[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"
|
||||
Reference in New Issue
Block a user