Skip to content

feat: Runtime.compile runs a program compiled once many times - #68

Merged
kommander merged 1 commit into
devfrom
split/01b-runtime-compile
Nov 25, 2026
Merged

kommander merged 1 commit into
devfrom
split/01b-runtime-compile

Conversation

@kommander

Copy link
Copy Markdown
Contributor

runtime.compile(code) compiles a program once; program()/execute() take the Compiled like source, on the Promise and Effect APIs.
Why: hosts that run the same program many times skip the parse and compile. 2/9 of the TS split of rust.

@kommander
kommander force-pushed the split/01b-runtime-compile branch from 2013ec0 to d4c9fd7 Compare November 24, 2026 12:00
@kommander
kommander force-pushed the split/01-reference-fixes branch 2 times, most recently from a703794 to a775842 Compare November 24, 2026 22:26
@kommander
kommander force-pushed the split/01b-runtime-compile branch from d4c9fd7 to 8f5cb6c Compare November 24, 2026 22:26
@kommander
kommander force-pushed the split/01-reference-fixes branch from a775842 to ffa8e3e Compare November 24, 2026 23:16
@kommander
kommander force-pushed the split/01b-runtime-compile branch from 8f5cb6c to 9efc0d0 Compare November 24, 2026 23:20
@kommander
kommander force-pushed the split/01-reference-fixes branch from ffa8e3e to 06614c7 Compare November 24, 2026 23:24
@kommander
kommander requested a review from thdxr as a code owner November 24, 2026 23:24
@kommander
kommander force-pushed the split/01b-runtime-compile branch from 9efc0d0 to 19cea12 Compare November 24, 2026 23:29
Base automatically changed from split/01-reference-fixes to dev November 24, 2026 23:37
runtime.compile(code) parses and compiles a program once, or gives the diagnostic its run would fail with
first; program() and execute() take the Compiled as they take source, on the Promise and Effect APIs. A run
of it, and a state saved from one, are the same as from its source.
@kommander
kommander force-pushed the split/01b-runtime-compile branch from 19cea12 to 9622aeb Compare November 24, 2026 23:38
@kommander
kommander merged commit ed5db06 into dev Nov 25, 2026
1 check passed
@kommander
kommander deleted the split/01b-runtime-compile branch November 25, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant