Repository navigation
v0.0.6 New targets: SpaceWasm and Stellar
SpaceWasm target
Inference can now build for NASA JPL's SpaceWasm flight interpreter, a no_std WebAssembly 1.0 decoder meant to run inside a spacecraft's flight software. Ask for it with infc --target spacewasm or [build] target = "spacewasm" in Inference.toml. Emission is unchanged β a spacewasm build is byte-for-byte the same module a wasm32 build of the same source produces β so what the target buys is a conformance check and a set of refusals, not a rewrite.
- Every build is checked against the flight decoder's own limits before any artifact is written: parameter, local and frame word counts, index ranges, host-import name lengths and arity, custom-section names and memory size. A refusal names the offending function and both numbers. The build also reports each function's control-frame and operand-stack depth against the reference embedder's bounds.
- New analysis rule A055 catches the parameter-word limit at the declaration itself, in
infcbuilds and live in the editor, instead of only at the finished module. proofmode, post-MVP WebAssembly features, and any non-deterministic construct in a shipping function are all refused at this target (#325).
infs run executes SpaceWasm builds
infs run now executes a spacewasm build in process, under the same flight interpreter, with no wasmtime involved. It loads the module with the FΒ΄ (F Prime) reference host functions β panic, rsleep, command, message, telemetry, and clock_ms β checks every import before running anything, and reports a trap, an unknown import, or an over-budget module in plain language naming what failed.
infs run --fuel Ncaps a run to N interpreter instructions and reports the budget running out cleanly, so a non-terminating program fails a run instead of hanging it; options like--fuelmust precede the invoked function's own arguments.- Running a
wasm32build that imports host functions is still refused, but when those imports are exactly the FΒ΄ reference set, the refusal now suggests switchingtarget = "spacewasm"to run it (#485).
Host imports
A program can now declare functions its embedder supplies at run time, instead of only functions linked in from a .wasm library:
use { clock_ms } from host::env;
Inference.toml's new[host-imports]table is a per-project allowlist: omit it to admit every host import the program declares, listmodule = ["field", ...]entries to admit only those, or declare the table with no keys to admit none at all.infc --host-imports=module.field,...is the equivalent flag, and both mechanisms print what applied βhost imports: env.clock_msversushost imports (no allowlist): env.clock_msβ so a build log shows whether a reviewed policy actually ran.- A proof (
-v) build that binds a host import is refused outright: the function's body lives outside the artifact a proof is written about (#464).
Stellar
--target stellar (or [build] target = "stellar") turns a linked Inference module into a deployable Soroban smart contract. After linking, the module is rewritten into the Stellar value ABI: one wrapper per exported method taking and returning the host's tagged word, and Soroban's environment-metadata section appended.
- Contracts now also carry
contractspecv0andcontractmetav0, ahead of the environment-metadata section, sostellar contract invoke,stellar contract info interface, and bindings generators can type each method's arguments by name instead of requiring hand-encoded calls. - The rewriter refuses a parameter Stellar's own tooling can't address reliably: one written
_, one named in more than 30 bytes, or one whose name collides with another parameter'sstellarCLI flag alias (#324, #466).
Verification and Rocq
Proof obligations now sit on a real IR: a new core/hassert crate holds the HAssert/HTerm representation, Rocq output targets the wasm-verifier contract, built on WasmCert-Coq v2.2.0 (ValidModule plus a new ValidSpec), and a specification that can't be translated now aborts code generation (P001-P009) instead of silently shipping an unverifiable module. Several soundness gaps close on top of that foundation: exists- and unique-quantified specification functions now compile end to end and produce real obligations instead of being rejected outright; a specification whose translated obligation is vacuously true is refused (P010) rather than shipped as a green, contentless proof; every universally-quantified narrow-typed variable now states the value range its declaration actually admits; and a term-position &&/|| is now encoded as a witnessed existential β the latter two close cases where the previous encoding was provable of the wrong values, or unsound outright. A specification may now call a linked external fn, and the linker now accepts several integer conversion operators it used to reject (#299, #354, #356, #357, #383, #353, #363).
Toolchain
infs self updatenow preservesinfs's third-party license notices (SpaceWasm's Apache-2.0 notice andlibm's MIT license) across an update, and release archives ship alicenses/directory alongside the binaries (#485).infsis about 23% smaller (9,298,832 β 7,208,096 bytes, measured on macOS arm64), and its release archives are about 10-12% smaller on all three platforms, measured by the release dry run;infcis unchanged (#325).- Release binaries are now exactly what
cargo build --releaseproduces β earlier releases accidentally shipped binaries rebuilt with test-only features (extra instrumentation, larger dependency feature sets) baked in. infs/infc --versionnow reports the real release version instead of always printing0.0.1(#408).- A new SpaceWasm benchmark tracks what compiled programs cost the flight interpreter β instructions executed and IR size β against a committed history, and warns in CI when either grows by more than 5% (#325).
Breaking changes
Every ### Breaking entry in this release whose change landed since v0.0.5, condensed to one line:
AnalysisOptionsgains a publictargetfield β a literal naming onlystack_budget_bytesstops compiling; spread..AnalysisOptions::default()to keep building againstwasm32(#325).ExportSignature::paramsis nowVec<AbiParam>(a name plus a type) instead ofVec<AbiType>(#466).StellarAbiErrorgainsUnnamedParameter,ParameterNameTooLong,ParameterNamesCollide, andAlreadyAContractnow carries the section name it found β an exhaustive match needs new arms (#466).--target stellarnow refuses an exported parameter written_, named over 30 bytes, or colliding with another parameter's CLI flag alias (#466).unitis now a reserved word; the unit type is spelled()only β anything named or typedunitno longer compiles.Inference.tomlgains a[host-imports]table; aninfsolder than this release loads past it silently and applies no allowlist at all (#464).- The compiler ABI minor is now 8 β a tool holding a host-import policy must gate
--host-importson it and refuse rather than silently drop it against an olderinfc(#464). - A
--wasm-dep/[wasm-dependencies]key whose first segment ishostis now a hard error (#464). hostis reserved as the first segment of ause β¦ fromclause; a linked module logically namedhost::...must be renamed before upgrading (#464).codegen()'s target-naming refusals now render the target the way--targetspells it (stellar), not its RustDebugform β tests asserting the old text must update (#325).check_wasm1moves out ofcore/stellar-abiinto newcore/target-conformance; theinference_stellar_abire-export is gone (#325).Target::Sorobanis renamed toTarget::Stellar, moving matching refusal text and acov_markname with it (#324).[build] targetis now validated on load; an unsupported value now fails the build instead of silently buildingwasm32(#324).checkedandwrappingare now reserved words β any identifier spelled either way is a parse error (#316).+,-,*, and unary-now trap on overflow by default; wrap that arithmetic explicitly inwrapping(...)to keep the old two's-complement behavior (#316).typealiases are removed from the language entirely (#182).- The WASM
namesection now uses two disjoint namespaces (file-qualified compiled names vs.::-joined external names); a downstream Rocq proof naming a non-entry-file function must re-pin to its new identifier (#362). - The static-merge linker now refuses to emit a module whose proof obligations don't resolve to exactly one function (#362).
muton anexternal fnparameter is now linker-checked; an immutable compound parameter orselfcan no longer be forwarded to amutexternal position (#333).- An
external fn's identity is now its declaration, resolved per file, rather than its bare name looked up program-wide (#423). - A specification may now call a bound
external fn; a mismatched application arity against the resolved function is now a hard error (#363). exists/unique-quantified spec functions now compile instead of being rejected; theinference.hspecswire format bumps to v2 (recompile rather than migrate) (#354).- New fatal
P010refuses a spec function whose obligation collapses to a vacuous truth instead of shipping it (#356). - Term-position
&&/||in obligations now encodes as a witnessed existential instead of an eager term; downstream proofs over the old shape must be restated (#383). - Call-site argument labels are now checked; mixed, unknown, or out-of-order labels are now errors instead of being silently bound positionally (#378).
- A struct method's
self/mut selfdeclared anywhere but the first parameter is now a type error (#377). - A parameter name declared twice in one signature is now a
DuplicateParameterNameerror, including onexternal fn(#377). - Proof-mode obligations now guard every universal slot with an explicit type antecedent, and
!=no longer conjoins an extra definedness clause β old emitted obligations no longer discharge against the hardened contract (#353). - A narrow-typed quantified scalar's obligation now states its declared value domain β previously emitted obligations were unsound and must be restated (#357).
- The linker now admits eight integer width/sign-extension operators it previously rejected; an exhaustive match over the Rocq stub's instruction enum needs new arms (#363).
codegen()takes oneCodegenOptionsstruct in place of its separate arguments, including the newfeatures: EmitFeatures(#315).Inference.tomlis now strictly verified; unknown keys in a struct table are rejected, andmanifest_version/editionare removed (#315).- New rule A046 rejects a unary minus written apart from its literal (
- 128), which previously compiled as a different value than the glued form (#376). - New rule A045 rejects values of a field-less struct (#332).
inference_parser::Input::newnow also takes the source text:Input::new(src, &tokens)(#219).wasm_to_v/translate_bytesgains a fourth parameter,hspecs_by_spec: &HSpecMap, sourcing obligations from the newcore/hassertIR (#299).- Rocq output now targets wasm-verifier on WasmCert-Coq v2.2.0:
ValidModuleis 1-ary and a newValidSpeccarries each spec's obligation. Downstream Rocq libraries must update (#299). - New leaf crate
core/hassertholds the obligation IR and theinference.hspecssection codec (#299). - New fatal proof-mode diagnostics
P001-P009refuse an untranslatable spec instead of silently emitting an unverifiable module (#299). wasm-to-vnow rejects any non-deterministic instruction surviving in an executable function body (#299).
Upgrading
Run infs self update. Every binary before v0.0.6 reported 0.0.1 from --version, so infs self update on an older toolchain always believed a newer release existed and updated regardless of what was actually installed; from v0.0.6 on, the reported version is real and update comparisons work correctly. The update also now preserves infs's third-party license notices across the swap.
The language server ships with the managed toolchain, so its new diagnostics, A055 among them for a spacewasm project, arrive with the update. Syntax highlighting for the new reserved words (unit, checked, wrapping) comes from the VS Code extension's own grammar and ships with the extension.
See CHANGELOG.md for the complete list of changes in this release.