Skip to content

Examples

Each example is a complete project with file layout, source, build commands, and run notes. Pick one near your problem shape; every page links to the relevant module docs at the bottom.

  • Frontend — todo list with reactive DOM updates. Vite + vanilla DOM. Output is static.
  • Backend — WebSocket server with per-connection signals and an SSE stats endpoint. Node 18+.
  • Edge — Durable Object rate limiter with when blocks for once-per-window alerts. Cloudflare Workers.
  • Multi-plant auto waterer — moisture sensors + pumps + tank-level sensor with when-block edge alerts. Real ADS1115 + Pi GPIO, plus a simulator that runs on any host.
  • GPIO state over HTTP + SSE — button + LED exposed as a live web surface. One effect { } block writes the LED AND broadcasts to every SSE client.
  • Voice assistant — wake-word → STT → LLM → TTS → speaker, with one grammar-constrained tool that flips a real GPIO LED. ~35 lines.
  • Voice assistant + MCP — same loop, bridged to a real MCP server (Context7 for live library docs, plus the official memory server for persistent recall). One mcp.connect() flattens every tool into the bot.
  • Smart camera — V4L2 capture → motion detector → save a JPEG snapshot whenever motion fires. Three Parabun modules glued by an async iterator.
  • Streaming ETL — 10M-element |> pipeline with SIMD primitives. ~5-6× over .map().reduce(). Cross-runtime.
  • Parquet ETL — synthesize 50K events, write Parquet with bloom filters, demonstrate row-group skip on targeted queries. Cross-runtime.
Terminal window
# Install the @para/* packages your code uses, e.g.:
npm install @para/signals @para/parallel @para/arrow
# .pts / .pjs files compile with parabun build:
parabun build src/main.pts --outfile dist/main.js

Compiled output is standard JavaScript with import "@para/foo" statements — bundlers resolve those through node_modules with no additional config.

Projectparabun build targetRunner
Frontend / browser--target browserVite, esbuild, etc.
Backend / Node--target nodenode dist/...
Edge / Workers--target browserWrangler
IoT / voice / vision(Parabun-only)parabun src/...
Data ETLany targetany host