~/talk

Embedding WebAssembly in OCaml for Safe Program Construction

Talkat OCaml Workshop 2025 · on Friday, 2025-10-17· [webassembly]
links:none on file
slides:none on file

Library called WasML encodes WebAssembly stack inputs and outputs and locals as OCaml GADTs so illegal wasm programs are rejected at OCaml compile time, not just at runtime. It sequences instructions with combinators and uses continuation-passing style to build a flat instruction list instead of deep ASTs. To handle locals it limits constructors with a practical 32-local cutoff, which covers about 96% of a 10 million–function, 8,000–module dataset. The tool targets safe, composable code generation and does not attempt wasm-level optimizations.

AI-written summary · about

  1. 0:00WML introduction
  2. 2:04WebAssembly libraries' limits
  3. 4:55Modeling instructions with stack types
  4. 9:13Handling local variables
  5. 12:44Limits of manual indexing
  6. 15:35Simplifying with combinators
  7. 17:19Combining via CPS
  8. 19:24Future directions
  9. 20:07Conclusion & Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.