Building our own JavaScript engine in Rust
Meet Otter — not another “hello world” WebAssembly demo, but a full TypeScript/JavaScript runtime you can embed into any Rust application in just a couple of lines.
Under the hood: JavaScriptCore (Safari’s engine, also used by Bun). Fast, mature, battle-tested.
The key idea: we embed Otter into our FHIR server.
So you’ll be able to write validators, mappings, and business logic in familiar TypeScript — and simply upload files to the server. No rebuilds. No redeploys. No pain.
So you’ll be able to write validators, mappings, and business logic in familiar TypeScript — and simply upload files to the server. No rebuilds. No redeploys. No pain.
What it already supports:
- TypeScript out of the box — no separate tsc, it just works
- Node.js-compatible APIs — fs, path, fetch, and the usual essentials
- Built-in package manager — installs npm packages without requiring Node.js
- Sandboxing & policies — control exactly what scripts can read/write/download
- Essentially: Deno-like ergonomics, but as a library — embed it and run
CLI is already available and you can try it today.
There’s still a lot of work ahead — but with your feedback and real-world use cases we’ll move much faster: better prioritization, fewer wrong turns, more polish where it matters.
Source code (GitHub): https://github.com/octofhir/otter
First public release is coming soon. Stay tuned.
fhir
octofhir
rust
jsc
javascript