pub fn compile_to_isa(source: &str) -> Result<String, ParseError>Expand description
Compile LOGOS source DIRECTLY to a self-contained WebAssembly module — no rustc, no cargo,
no wasm-bindgen, no toolchain. Uses the SAME front-end as vm_outcome
(crate::ui_bridge::with_parsed_program → crate::vm::Compiler::compile_with_types),
so the emitted module runs the IDENTICAL bytecode the VM does; the AOT WebAssembly backend
then lowers the whole program to .wasm.
Returns the bytes of a .wasm file. A program outside the backend’s supported fragment
yields a ParseError carrying the backend’s unsupported … reason — the corpus lock
turns that into a tracked, shrinking gap rather than a silent skip.
Compile source to LOGOS Silicon ISA assembly (Tier 5, --emit isa) — the register-VM opcode set
AS the native chip ISA, every instruction annotated with its reversibility contract (see
crate::vm::isa). Uses the SAME Oracle-optimized bytecode the other tiers run, so the emitted
ISA is the exact program the interpreter/VM/JIT/AOT execute, now as silicon.