diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e08d01..3c8d86b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,24 @@ All notable changes to WAFER are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.1] - 2026-08-06 + +### Fixed + +- **The search order is now authoritative** (Forth 2012 §16.3.3): a word + whose wordlist is not in the search order is no longer findable. + Previously lookup fell back to the newest entry across all wordlists, + making word hiding impossible. Verified against gforth and SwiftForth, + and guarded by a cross-engine corpus program. +- **Host words validate their stack arguments.** Around 40 host-implemented + words (`RND-SEED`, `ACCEPT`, `RESIZE`, `ALLOCATE`, `FREE`, `SEARCH`, + `SUBSTITUTE`, `ROLL`, `M*`, `UM/MOD`, `SF@ SF! DF@ DF!`, `F. FE. FS. F~`, + `2R@`, and friends) performed raw stack-pointer arithmetic with no + underflow check — calling them on an empty stack silently corrupted the + stack pointer (the compiled-code guards from 0.2.0 do not cover host + words). All argument-taking host words now fail with a clean, CATCHable + underflow error, enforced by a class-wide regression test. + ## [0.2.0] - 2026-08-06 The usability release: introspection, source files, honest errors, and a @@ -86,5 +104,6 @@ compliance suite, `CONSOLIDATE` whole-program recompilation, `wafer build` AOT export (WASM / native / JS loader), browser REPL, SHA-1/256/512 words, and cross-engine benchmark lanes against gforth and SwiftForth. +[0.2.1]: https://github.com/ok2/wafer/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/ok2/wafer/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/ok2/wafer/releases/tag/v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 8ed5922..07261a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1653,7 +1653,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wafer" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "clap", @@ -1664,7 +1664,7 @@ dependencies = [ [[package]] name = "wafer-core" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "insta", @@ -1679,7 +1679,7 @@ dependencies = [ [[package]] name = "wafer-web" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 864eec7..c3fc228 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.2.0" +version = "0.2.1" edition = "2024" license = "MIT OR Apache-2.0" repository = "https://github.com/ok2/wafer" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index e29bc0f..421bcab 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -9,7 +9,7 @@ license.workspace = true workspace = true [dependencies] -wafer-core = { path = "../core", version = "0.2.0" } +wafer-core = { path = "../core", version = "0.2.1" } wasmtime = { workspace = true } anyhow = { workspace = true } clap = { version = "4", features = ["derive"] } diff --git a/crates/web/Cargo.toml b/crates/web/Cargo.toml index f081149..ea7ca59 100644 --- a/crates/web/Cargo.toml +++ b/crates/web/Cargo.toml @@ -12,7 +12,7 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -wafer-core = { path = "../core", version = "0.2.0", default-features = false, features = ["crypto"] } +wafer-core = { path = "../core", version = "0.2.1", default-features = false, features = ["crypto"] } wasm-bindgen = "0.2" js-sys = "0.3" send_wrapper = { workspace = true }