51 lines
2.5 KiB
TOML
51 lines
2.5 KiB
TOML
[package]
|
|
name = "improvise-wasm-client"
|
|
version = "0.1.0-rc2"
|
|
edition = "2024"
|
|
description = "Browser-side improvise client: folds the wire vocabulary, resolves browser keys"
|
|
license = "Apache-2.0"
|
|
repository = "https://github.com/fiddlerwoaroof/improvise"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
improvise-protocol = { path = "../improvise-protocol" }
|
|
serde = { version = "1", features = ["derive"] }
|
|
# Parses frames, so it must read back the f64 that was written: per crate, because
|
|
# the wasm bundle builds alone (improvise-6oy4, context/code/protocol.md).
|
|
serde_json = { version = "1", features = ["float_roundtrip"] }
|
|
wasm-bindgen = "0.2"
|
|
|
|
# Deliberately NOT a dependency: `improvise-command`. A keymap binding names
|
|
# an intent resolved against a `CmdContext` — a `Model`, a `GridLayout` and an
|
|
# `App` this client does not have (gotcha 38, improvise-gxi). Depending on it
|
|
# would drag the whole host — `App`, `Workbook`, persistence, the import
|
|
# wizard — into the browser bundle to reach a lookup we could not use.
|
|
#
|
|
# It IS a dev-dependency: `tests/lockstep.rs` drives the authoritative host and
|
|
# this client over the same keypress and asserts their `ViewState`s agree. Dev
|
|
# dependencies are not built for `--target wasm32-unknown-unknown`, so the
|
|
# browser bundle is unaffected.
|
|
#
|
|
# `improvise-ws-server` is here for the same reason and on the same terms.
|
|
# It used to be here to keep a MIRROR honest — `socket.rs` carried its own
|
|
# copy of the server's two wire enums — and that mirror is gone: both ends
|
|
# now name `improvise_protocol::frame`'s one pair, so a rename is a compile
|
|
# error rather than something a test has to catch (improvise-xks6). What the
|
|
# dev-dependency buys now is `tests/browser_round_trip.rs`, which hands this
|
|
# client's own serialized frame to a real `Host` and folds what comes back.
|
|
# It is a native crate — tokio, tungstenite, an `App` owning a
|
|
# `Box<dyn Storage>` — so it could never be a real dependency.
|
|
[dev-dependencies]
|
|
improvise-command = { path = "../improvise-command" }
|
|
improvise-core = { path = "../improvise-core" }
|
|
improvise-ws-server = { path = "../improvise-ws-server" }
|
|
|
|
# The `wasm-opt` wasm-pack downloads predates bulk-memory being enabled by
|
|
# default, while LLVM emits `memory.copy` regardless — so the validator
|
|
# rejects the module unless the feature is named. Naming it here rather than
|
|
# turning `wasm-opt` off keeps the optimizer in the loop.
|
|
[package.metadata.wasm-pack.profile.release]
|
|
wasm-opt = ["-O", "--enable-bulk-memory"]
|