Repository navigation
refactor: simplify and harden runtime internals - #70
Merged
Merged
Conversation
andreiltd
commented
Jul 25, 2026
Owner
- consolidate WIT dispatch and import metadata
- tighten buffer, stream, and tagged value handling
- centralize runtime selection and build variants
- make quickjs context state unwind-safe
andreiltd
force-pushed
the
refactor-runtime
branch
from
July 25, 2026 14:39
b3880cd to
8095d34
Compare
- consolidate WIT dispatch and import metadata - tighten buffer, stream, and tagged value handling - centralize runtime selection and build variants - make quickjs context state unwind-safe
andreiltd
force-pushed
the
refactor-runtime
branch
from
July 25, 2026 15:14
8095d34 to
fc4e9ce
Compare
Merged
malformed-c
added a commit
to apsis-io/dwarf
that referenced
this pull request
Sep 2, 2026
The tidying half of the refactor, taken where it applies: `evaluated`
becomes a plain `Cell<bool>` (this runtime is single-threaded, so the
atomic bought nothing), the Node binding uses the new
`Runtime::builtin(sync, opt_size)` rather than matching two bools, and
`wit_imports` sheds helpers nothing calls any more.
Three places kept dwarf's side, for reasons rather than convenience:
- `interpreter.rs` is the big one. #70 PREDATES #76 and #77, so taking
its rewrite of `export_call` would have silently undone the resource
receiver fix and async resource members, both landed minutes ago. The
refactor there is a rewrite to re-apply both onto, not a merge.
- `TaskState::is_active` and `JsState::module_loader_available` are
dwarf's own, and documented; upstream's hunk only removed them
because upstream does not have them.
- The CLI's minify block: upstream independently found the same bug
dwarf fixed today - a partial AST accepted after a parse error - and
fixed it in the same place it already lived. dwarf's now sits in
dwarf-core, after the TypeScript transform, which is the ordering the
CLI-side version cannot express. Their regression test is taken,
adapted to dwarf's flag and wording.
Upstream: andreiltd/componentize-qjs#70
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.