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
| Feature | Bytecode VM (ochre run) | Cranelift AOT (ochre build) | WASM Playground (ochre-wasm) | ||
|---|---|---|---|---|---|
Int, Float, Bool, Str literals | Supported | Supported | Supported | ||
Raw strings ('...') | Supported | Supported | Supported | ||
String interpolation ("{expr}") | Supported | Planned | Supported | ||
let / var & deep immutability | Supported | Supported | Supported | ||
| Functions & recursion | Supported | Supported | Supported | ||
if / else, while, for i in a..b | Supported | Supported | Supported | ||
Short-circuit && / `\ | \ | ` | Supported | Supported | Supported |
print / println | Supported | Supported | Supported | ||
List<T>, Map<K, V> & nested CoW | Supported | Planned | Supported | ||
struct, enum, impl, match | Supported | Planned | Supported | ||
Closures & map / filter / reduce | Supported | Planned | Supported | ||
Option (T?), Result (T!E), ?, ?? | Supported | Planned | Supported | ||
json_parse / json_stringify | Supported | Planned | Supported | ||
import "./file.och" | Supported | Supported (merged AST) | Single-file only | ||
args(), env(), input() | Supported | Planned | N/A (browser) | ||
read_file / write_file | Supported | Planned | N/A (browser) | ||
spawn, join, channel, send, recv, sleep, clock | Supported | Planned | N/A (single-threaded) | ||
http_serve (HTTP/1.1 server) | Supported | Planned | N/A (no raw sockets) |
Linking Notes for ochre build
ochre buildcompiles viacranelift-objectand links a tiny C runtime shim (ochre_print_*) using your systemcccompiler (gccorclang).- Output binaries link dynamically against system
libc(not static musl binaries by default). - Pass
--emit-objto emit a standalone.oobject file without invokingcc.