@mudomi/onykia-engine
v0.3.0
Published
Typst compiled to WebAssembly for the web with nice bindings for IDEs and more.
Readme
onykia-engine
Typst compiled to WebAssembly for the web with nice bindings for IDEs and more.
Read the docs on docs.onykia.eu.
Used in onykia-editor and onykia-app.
Packages
| npm | what |
|-----|------|
| @mudomi/onykia-engine | TS client: worker pool, message bus, IDE-feature API. |
| @mudomi/onykia-codemirror | CodeMirror 6 bindings: highlight, autocomplete, hover, definition, diagnostics. |
| @mudomi/onykia-monaco | Monaco binding: edit forwarding + diagnostics. |
Prerequisites
- Rust nightly
- wasm-bindgen-cli - version-matched to the
wasm-bindgencrate insrc/rust/Cargo.toml. - Node.js 20+ and npm 10+.
Try it
npm install
npm run build:wasm
npm run example:codemirror # or example:monacoCross-origin isolation
Loading onykia-engine requires a cross-origin-isolated host page, serve it with:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corpWithout these headers createWasmFactory() throws synchronously with a
message pointing at this section. See SharedArrayBuffer requirements.
Known gaps
- Outline notifications are stubbed.
- archive() is stubbed.
- Font index decoder only accepts JSON.
- Spellcheck is delegated to JS; no built-in hunspell.
- Monaco binding supports only edits + diagnostics - no syntax highlight, autocomplete, hover, or definition.
More
For contributions & release flow see CONTRIBUTING.md.
This package bundles Typst, licensed under the Apache License 2.0. The code in this package is MIT licensed. See LICENSE and NOTICE.
