Skip to content

docs(compiler): add a runnable public API quickstart - #1115

Merged
andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:docs/compiler-api-quickstart
Oct 22, 2026
Merged

andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:docs/compiler-api-quickstart

Conversation

@jinchuntan

@jinchuntan jinchuntan commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1076.

Adds a copyable JavaScript quickstart using the public compiler entry point: compile a counter and exported helper, allocate memory, initialize defaults, run the program and read its result. Includes cache reuse, matching shared-memory options, repository setup and links for the next steps.

Validation on Node 24.16.0:

  • npx nx run @8f4e/compiler:build passed.
  • Extracted the exact README example and ran node quickstart.mjs: both outputs were 42.
  • Verified cache reuse (two AST hits), valid cached Wasm and non-shared memory.
  • Checked all six relative documentation links and anchors.

Show source parsing, compilation, memory allocation and execution with a
counter, an exported function and returned-cache reuse. Explain memory
initialization, byte-addressed reads and matching shared-memory options.
@irimias57 irimias57 added contributor compiler Compiler, tokenizer, codegen, and language-semantics work labels Oct 19, 2026

@andorthehood andorthehood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the docs @jinchuntan !

@andorthehood
andorthehood merged commit 1b9db50 into 8f4e:main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler Compiler, tokenizer, codegen, and language-semantics work contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a runnable public compiler API quickstart

3 participants