0947001b70
a61f: `cargo test -p improvise-wasm-client --lib` failed with E0277, because `FormulaEntry: From<&str>` exists only under improvise-protocol's `test-support` feature, which that crate's dev-dependencies never asked for. `--workspace` hid it: feature unification pulled the feature in through improvise-command's dev-dep. A sweep of every member with `cargo test -p <crate> --no-run` found the same failure in the root `improvise` crate (tests/bug_hunt_reproductions.rs). Both now request the feature. The normal wasm tree still carries no `test-support`. aopa: eight helpers in resolve.rs's tests folded client-composed commands through `fold`, the host's door, so a composed Command::Model was never awaited in `in_flight`. All eight use `fold_outgoing`, one frame per key, as web/app.js does. `a_folded_browser_commit_waits_for_the_host` pins press_folded; the rival that folds through `fold` again fails it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
54 lines
2.7 KiB
TOML
54 lines
2.7 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" }
|
|
# The tests build `FormulaEntry` from `&str`, which only `test-support` provides.
|
|
# Asked for here, or `-p improvise-wasm-client` alone does not compile (a61f).
|
|
improvise-protocol = { path = "../improvise-protocol", features = ["test-support"] }
|
|
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"]
|