Reference · 07

VM, AOT & WASM Feature Compatibility

Exact feature support matrix across Ochre's Bytecode VM, Cranelift Native AOT (ochre build), and WebAssembly Playground (ochre-wasm) in v0.1.0-alpha.4.

Ochre targets three execution environments. Use this matrix to see exactly which features are supported on each backend in v0.1.0-alpha.4.

Feature Matrix

FeatureBytecode VM (ochre run)Cranelift AOT (ochre build)WASM Playground (ochre-wasm)
Int, Float, Bool, Str literalsSupportedSupportedSupported
Raw strings ('...')SupportedSupportedSupported
String interpolation ("{expr}")SupportedPlannedSupported
let / var & deep immutabilitySupportedSupportedSupported
Functions & recursionSupportedSupportedSupported
if / else, while, for i in a..bSupportedSupportedSupported
Short-circuit && / `\\`SupportedSupportedSupported
print / printlnSupportedSupportedSupported
List<T>, Map<K, V> & nested CoWSupportedPlannedSupported
struct, enum, impl, matchSupportedPlannedSupported
Closures & map / filter / reduceSupportedPlannedSupported
Option (T?), Result (T!E), ?, ??SupportedPlannedSupported
json_parse / json_stringifySupportedPlannedSupported
import "./file.och"SupportedSupported (merged AST)Single-file only
args(), env(), input()SupportedPlannedN/A (browser)
read_file / write_fileSupportedPlannedN/A (browser)
spawn, join, channel, send, recv, sleep, clockSupportedPlannedN/A (single-threaded)
http_serve (HTTP/1.1 server)SupportedPlannedN/A (no raw sockets)

Linking Notes for ochre build

  • ochre build compiles via cranelift-object and links a tiny C runtime shim (ochre_print_*) using your system cc compiler (gcc or clang).
  • Output binaries link dynamically against system libc (not static musl binaries by default).
  • Pass --emit-obj to emit a standalone .o object file without invoking cc.