4769987b20
A host word signals failure by throwing across the JS boundary, and the
browser runtime reported that exception with its Debug form, so an
empty-stack RESIZE surfaced as
call_func(134) failed: JsValue(Error: Stack underflow ...)
with the engine's JS stack trace glued on. The thrown message IS the
Forth message, so take it verbatim: 'Stack underflow', the same text the
native CLI prints. Exceptions without a message keep the call context --
those are genuine runtime faults, not Forth throws.
CATCH is unaffected: it reads the throw code from its own channel rather
than parsing messages. Verified against a fresh VM in Node (initSync +
WaferRepl): host-word underflow, compiled-guard underflow, THROW,
unknown word and ' RESIZE CATCH . all match the native CLI.
Ships as v0.2.4.
62 lines
1.6 KiB
TOML
62 lines
1.6 KiB
TOML
[workspace]
|
|
members = ["crates/*"]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
version = "0.2.4"
|
|
edition = "2024"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/ok2/wafer"
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "deny"
|
|
unused_must_use = "deny"
|
|
elided_lifetimes_in_paths = "warn"
|
|
trivial_numeric_casts = "warn"
|
|
unreachable_pub = "warn"
|
|
unused_qualifications = "warn"
|
|
|
|
[workspace.lints.clippy]
|
|
# Pedantic group (selective)
|
|
cloned_instead_of_copied = "warn"
|
|
explicit_iter_loop = "warn"
|
|
flat_map_option = "warn"
|
|
implicit_clone = "warn"
|
|
inconsistent_struct_constructor = "warn"
|
|
inefficient_to_string = "warn"
|
|
manual_let_else = "warn"
|
|
map_unwrap_or = "warn"
|
|
redundant_closure_for_method_calls = "warn"
|
|
semicolon_if_nothing_returned = "warn"
|
|
uninlined_format_args = "warn"
|
|
unnested_or_patterns = "warn"
|
|
unused_self = "warn"
|
|
# Correctness & suspicious
|
|
doc_markdown = "warn"
|
|
match_wildcard_for_single_variants = "warn"
|
|
needless_continue = "warn"
|
|
ref_as_ptr = "warn"
|
|
# Nursery (stable enough to use)
|
|
needless_collect = "warn"
|
|
or_fun_call = "warn"
|
|
|
|
[workspace.dependencies]
|
|
wasm-encoder = "0.255"
|
|
wasmparser = "0.255"
|
|
wasmtime = "47"
|
|
anyhow = "1"
|
|
thiserror = "2"
|
|
proptest = "1"
|
|
insta = "1"
|
|
sha1 = "0.10"
|
|
sha2 = "0.10"
|
|
send_wrapper = "0.6"
|
|
|
|
# Cargo strips debuginfo from release artifacts by default, and on macOS that
|
|
# also strips the metadata proc-macro dylibs need to be loadable — release
|
|
# builds then fail with "can't find crate" for every proc-macro (rustversion,
|
|
# thiserror_impl, ...). Build scripts and proc-macros gain nothing from
|
|
# stripping, so exempt them; the release binaries stay stripped.
|
|
[profile.release.build-override]
|
|
strip = false
|