Skip to content

Add portable object formats and checked numeric/storage IR - #334

Merged
LunaStev merged 8 commits into
wavefnd:masterfrom
LunaStev:feat/portable-objects-and-ir
Oct 22, 2026
Merged

LunaStev merged 8 commits into
wavefnd:masterfrom
LunaStev:feat/portable-objects-and-ir

Conversation

@LunaStev

@LunaStev LunaStev commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

This adds explicit AMD64/AArch64 COFF and Mach-O assembler output, checked numeric IR execution, and typed frontend storage. The assembler bridge is now assembler/asmobj (crate asmobj). Existing ELF output and O0 behavior are retained.

The branch contains exactly eight DCO commits, in the approved order:

Batch Result Issues
1 Nest/rename asmobj; bounded AMD64 then ARM64 COFF, CLI selection and native Windows fixtures #107, #225
2 Rust/Wave spacing Quality check, release socket-cli preflight and focused issue forms #319, #317, #25
3 Cast contract, versioned frontend integer casts and checked lossless integer conversions #89, #104, #269
4 Precision-correct scalar IEEE arithmetic and bit-aware integer/float negation #264, #162
5 Integer↔float and float-width conversions with explicit rounding/range traps #266, #267
6 Tracked scalar-field structs, pointer expressions and checked fixed arrays #155, #156, #157
7 Observable effects/traps, volatile scalar accesses and transactional verified passes #98, #115, #160
8 Bounded AMD64 then ARM64 Mach-O, explicit relocation namespace and native macOS fixtures #108, #224

Validation on the final integrated sources:

  • Default workspace: 503 passed, 4 opt-in tests ignored. All features without Wave: 581 passed, 4 ignored. All features linked to the actual pinned Wave decoder/CFG: 606 passed, 4 ignored.
  • Rust formatting/item spacing; default/all-feature workspace Clippy with warnings denied; warning-free rustdoc; Rust 1.86 all-target/all-feature check; 48 Python helper tests; 128 AST schema/decoder agreement cases; actionlint.
  • 5,760 exact Fraction arithmetic vectors, 10,966 independent conversion vectors, all 65,536 binary16 patterns through both wider formats, and native randomized f32/f64 comparisons. No host-f64 intermediate rounding, fast math, implicit FMA or FTZ.
  • Bounded assembler/object/IR/AST mutation runs (2,048 cases each, 512 MiB process limits), the new AST-v5 storage/cast/volatile seed, and a 256-stream independent tracked-memory campaign.
  • Standalone default/all-feature CLI smoke under an empty PATH. LLVM inspects both COFF and Mach-O machines; separate LLD tools cross-link both; Mach-O also links mixed Whale/LLVM object pairs in both directions.
  • The optimized all-feature release binary passes package preflight and extracted standalone execution. The rebuilt actual Wave core passes 11 valid fixtures and 100,000 bounded mutations at 512 MiB.
  • Native Windows x64/ARM64 and macOS Intel/ARM64 CI system-links two Whale objects with a C driver, then checks a cross-object call and an absolute payload+4 data pointer by executing for exit 42. These checks gate native format support.

Boundaries: Rust owns object serialization, CLI/file handling and the typed IR interpreter. The existing decoder and CFG remain implemented in actual Wave; normal Cargo builds do not require Wave/LLVM and retain explicit unavailable behavior without the opt-in archive. Linked reverse execution remains Linux x86_64. Object serialization for another machine is not reverse/native-IR execution support. COFF/Mach-O are initial relocatable subsets with explicit unsupported forms; the static executable linker/reader remain AMD64 ELF. Structs initially have nonrecursive scalar fields and arrays scalar elements; there is no aggregate ABI expansion, decompiler or optimizer pipeline.

Native Windows/macOS format fixtures and the complete PR CI matrix passed.

Closes #107
Closes #225
Closes #319
Closes #317
Closes #25
Closes #89
Closes #104
Closes #269
Closes #264
Closes #162
Closes #266
Closes #267
Closes #155
Closes #156
Closes #157
Closes #98
Closes #115
Closes #160
Closes #108
Closes #224

Move the assembler bridge into assembler/asmobj, add explicit COFF target and relocation namespaces, bounded section/symbol writers and checked in-place addends. Expose format selection through assembly CLI and gate native Windows call/data execution with a system compiler fixture.

Refs wavefnd#107, wavefnd#225

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#319, wavefnd#317, wavefnd#25. Check socket-cli before publication and extracted validation; use the Rust/Wave formatting guard and focused Whale issue forms.

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#89, wavefnd#104, wavefnd#269. Preserve mathematical values or trap at checked_int; retain wrapping casts and version AST/text extensions. Validate integer boundary matrices and schema agreement.

Signed-off-by: LunaStev <luna@lunastev.org>
…ation

Refs wavefnd#264, wavefnd#162. Use integer IEEE significands and exact rational/native oracles; preserve sign-bit negation for runtime and constant expressions. IR tests: 266 passed, 2 ignored; schema agreement: 112 cases.

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#266, wavefnd#267. Single-round integer IEEE conversion, truncating range-checked float-to-int and canonical numeric NaNs. Validate 10,966 independent vectors, all binary16 storage patterns, and 269 IR tests.

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#155, wavefnd#156, wavefnd#157. Preserve source order, target layout, tracked lifetimes and explicit array bounds; bound storage expansion and index field constants. IR tests: 276 passed, 2 ignored; schema agreement: 116 cases.

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#98, wavefnd#115, wavefnd#160. Preserve volatile scalar accesses, verify and roll back pass boundaries, and explicitly invalidate CFG/value/effect caches on changes. Keep the O0 pipeline disabled; exercise return/trap conformance and diagnostic rollback.

Signed-off-by: LunaStev <luna@lunastev.org>
Refs wavefnd#108, wavefnd#224. Separate load-command, section, symbol and relocation responsibilities; check independent LLVM/mixed-object links and gate native execution in macOS CI. Finish integration coverage for AST format 5 and typed IR format 8.

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev
LunaStev force-pushed the feat/portable-objects-and-ir branch from 924a848 to 46cf24b Compare October 21, 2026 16:54
@LunaStev
LunaStev merged commit db0b222 into wavefnd:master Oct 22, 2026
27 checks passed
This was referenced Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment