← Back
Home › Systems › Cloud platform and compute

wasm-runtime

WebAssembly runtime

Wasmtime

SystemTechniques · 9Primitives · 27 wasm-runtime Instruction selectioncompilers · medium: Cover the IR with target instruction patterns at least cost; greedy maximal munch is simple, dynamic programming over a tree or DAG is optimal.›JIT compilationcompilers · medium: Run cold code in a cheap tier, count executions, and compile only what gets hot, trading warm-up time and memory for peak speed.›Register allocationcompilers · medium: Map unlimited virtual registers onto a few machine registers, spilling the rest to the stack; linear scan is fast, graph coloring and splitting allocators give better code.›Dataflow analysiscompilers · medium: Compute a fact per program point (live variables, reaching definitions, available expressions) by iterating transfer functions over the CFG to a fixed point.›Deoptimizationcompilers · medium: Speculate with guards, and on failure rebuild the slow-tier frames from compile-time metadata and resume there, so optimized code may assume the common case.›Inline cachescompilers · medium: Per-call-site cache of "this object shape, that slot or target", turning dynamic property and method lookup into a compare and a load.›Graph coloringgraphs · medium: Greedy/DSatur colouring for conflict-free assignment such as radio channelsSSA formcompilers · low: Give every variable exactly one definition, merging at joins with phi functions; def-use becomes explicit and optimizations turn sparse and cheap.›Bytecode interpretercompilers · low: Register/stack VM dispatch loop for executing compiled plans or rules (SQLite VDBE, nftables)Instruction meteringcompilers · low: Charge a fuel budget per instruction or per basic block and trap at zero, so untrusted code is bounded by work done, deterministically.›WebAssembly binary formatcompilers · low: A section-based module container with LEB128 integers and structured, typed code, so untrusted bytes are validated in one pass and compiled as they stream in.›Cooperative schedulingconcurrency · low: Green threads/coroutines yielding at await points on a user-space schedulermmap and the page cachehardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.›Virtual memory and the TLBhardware-os · low: How page tables and TLBs translate every address, what TLB reach means, and when 2 MiB or 1 GiB huge pages pay off on Linux.›Capability-based security (object c…security · low: Authority is a handle you hold, not an identity you have: code can only act on objects it was explicitly given handles to, and handles can only be narrowed and passed on.›Guard pages memory sandboxingsecurity · low: Reserve large virtual regions with guard pages so bounds checks become page faultsCopy on write snapshotsstorage · low: Point-in-time snapshots by sharing pages/extents and copying only on writeSlab allocatorsystems · low: Pre-carve pages into equal-size slots per size class with an in-place free list: O(1) alloc and free, no external fragmentation, cache-warm reuse.›Machine code emissioncompilers · low: Encode instructions to bytes for x86-64 and AArch64, branch relaxation, constant poolsTree pattern matchingcompilers · low: Matching AST patterns with metavariablesExecutable memory under W^Xcompilers · low: How JITs and code generators emit machine code under W^X: RW to RX flips, dual mappings, per-thread write toggles, and the instruction-cache flush.›Interval treedata-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.›Control-flow graphcompilers · low: Split a linear instruction list into basic blocks and connect them by jumps; the graph every optimizer, SSA builder and dataflow pass walks.›+ 2 more techniques+ 11 more primitives

Similar systems

Share the most building blocks with this one.