Mere Documentation
New here? Start with the Tour of Mere for a one-page overview of every core feature, then follow a tutorial to build something real.
Start here
Build something real
- Tutorial: build a REST API in Mere
- Tutorial: build a Redis client in Mere
- Tutorial: implement type inference in Mere
Reference
- Language reference (mere)
- Stdlib reference (mere)
- Patterns / cookbook (mere)
- Reserved names — Mere top-level fn names and C codegen collisions
Guides
- Memory management model (mere)
- Packages (v0.1)
- Database support
- HTTP demos
- Code generation (codegen)
Project
More
Try Mere in your browser
Pre-compiled Mere programs running directly in your browser via Wasm:
- playground — hello / fizzbuzz / fibonacci, captured stdout
- counter — button-driven counter; Mere closure dispatched back from JS (Phase 48 frontend FFI)
- 2048 — the full sliding-tile game, playable with the arrow keys; keyboard events delivered to a Mere closure via
dom_on_key - RISC-V console — a Mere-authored RV32IM CPU (compiled to Wasm) running a Mere-authored cartridge (compiled by
mere -rvto a flat RV32IM binary); arrow-key playable - echo — mirrors textarea input; exercises the JS → Mere string boundary
- wordcount — chars / words / lines stats via a Mere string-scan; word boundaries fold runs of whitespace
- self-host fmt — Mere pretty-printer written in Mere, running in browser (Phase 49 §S1)
- self-host REPL — Mere evaluator written in Mere, running in browser (Phase 51 §S2.A)
- self-host type-checker — Mere HM type inferencer written in Mere, running in browser (Phase 52 §S2.B)
- self-host compiler — Mere Wasm codegen written in Mere, running in browser (Phase 53 §S3)
Run a Mere web backend
Real HTTP servers written in Mere (Phase 54.35). Run under Node.js locally — see examples/ and contrib/http/:
http_echo_server.mere— minimal HTTP echohttp_json_api.mere— six-endpoint JSON REST API with CORS viahttp_set_headerhttp_todo_api.mere— in-memory TODO CRUD with top-level mutableMap[str, str]statehttp_docs_server.mere— serves this repo's own docs viaread_filehttp_fmt_service.mere— self-host formatter (parser + fmt) exposed over HTTPhttp_fmt_webapp.mere— single-file web app: HTML UI +/fmtAPI in one wasm binary