| 1 | [package] |
| 2 | name = "malice-worker" |
| 3 | version = "0.1.0" |
| 4 | edition = "2024" |
| 5 | publish = false |
| 6 | |
| 7 | # malice-worker's wasm profile needs are workspace-wide settings (debug info off |
| 8 | # for dev, panic=abort and LTO for release) that would otherwise leak into |
| 9 | # malice-server's native build if this crate stayed in the root workspace, so it |
| 10 | # gets its own, like macltok's harness/web. |
| 11 | [workspace] |
| 12 | |
| 13 | [lib] |
| 14 | crate-type = ["cdylib", "rlib"] |
| 15 | |
| 16 | [target.'cfg(target_family = "wasm")'.dependencies] |
| 17 | macltok = { git = "ssh://brewery@pls.lobotomise.me:33/atagen/macltok", rev = "e521a7177da3a9606f06df063e7095e5a1f00447", features = ["indexeddb", "serde", "mirror"] } |
| 18 | malice-core = { path = "../malice-core" } |
| 19 | ruma = { version = "0.16", default-features = false } |
| 20 | futures-util = { version = "0.3", default-features = false, features = ["std"] } |
| 21 | futures-channel = "0.3" |
| 22 | serde_json = "1" |
| 23 | # pinned exactly so flake.nix's wasmBindgenCli, built for this locked version, matches |
| 24 | # what wasm-bindgen-test-runner needs at test time |
| 25 | wasm-bindgen = "=0.2.128" |
| 26 | wasm-bindgen-futures = "=0.4.78" |
| 27 | js-sys = "=0.3.105" |
| 28 | |
| 29 | [dev-dependencies] |
| 30 | matrix-sdk = { git = "ssh://brewery@pls.lobotomise.me:33/atagen/matrix-rust-sdk", rev = "5ec7600f0a5f648c6e2a34b5be0a1494a4e2eafd", default-features = false } |
| 31 | wasm-bindgen-test = "0.3" |
| 32 | web-sys = { version = "0.3", features = ["SharedWorkerGlobalScope"] } |
| 33 | gloo-timers = { version = "0.3", features = ["futures"] } |
| 34 | |
| 35 | [lints.rust] |
| 36 | unsafe_code = "forbid" |
| 37 | |
| 38 | # with debuginfo the test wasm balloons and can OOM the test runner, per macltok's |
| 39 | # own harness/web/Cargo.toml |
| 40 | [profile.dev] |
| 41 | debug = false |
| 42 | |
| 43 | [profile.release] |
| 44 | opt-level = "z" |
| 45 | lto = true |
| 46 | codegen-units = 1 |
| 47 | panic = "abort" |
| 48 | strip = true |