GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PackageToJS: Add selectable UWASI runtime by krodak · Pull Request #811 · swiftwasm/JavaScriptKit

Conversation

@krodak

@krodak krodak commented Sep 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Overview

Add --wasi-runtime uwasi to PackageToJS while preserving
@bjorn3/browser_wasi_shim as the default. Generated packages, CDN imports, and
adapter tests use the published [email protected], including the host APIs from
swiftwasm/uwasi#26.

1. Package generation

Pass the selected runtime through CLI parsing, template preprocessing, package
metadata, and MiniMake cache fingerprints. Generate the UWASI helper only when
selected.

2. Adapter behavior

Use UWASI's public WASI.setInstance and lineBuffered APIs and preserve Node's
extractFile contract. Reject blocking poll_oneoff waits on the browser main
thread; Node and browser workers retain UWASI's blocking implementation.

3. Tests and documentation

Type-check browser, Node, and shared-memory templates, snapshot the UWASI planner
graph, test adapter wiring, and document runtime selection. Freeze the monotonic
clock in the sleep-policy test so its deadline cannot expire before the callback.

Test Plan

  • npm ci
  • swift test --package-path ./Plugins/PackageToJS
  • swift format lint --strict Plugins/PackageToJS/Sources/PackageToJS.swift Plugins/PackageToJS/Sources/PackageToJSPlugin.swift Plugins/PackageToJS/Tests/TemplatesTests.swift Plugins/PackageToJS/Tests/PackagingPlannerTests.swift
  • In Examples/NodeJS: swift package --swift-sdk swift-6.3-RELEASE_wasm js --wasi-runtime uwasi, then node main.mjs.
  • Loaded the [email protected] CDN module and checked required exports.
  • Checked real UWASI line buffering, shared-memory binding, and relative/missing/directory file extraction.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@krodak krodak self-assigned this Sep 4, 2026
@krodak
PackageToJS: Add selectable UWASI runtime
e0b98d8
@krodak
krodak force-pushed the kr/package-to-js-uwasi branch from f850b1f to e0b98d8 Compare September 4, 2026 09:40
@krodak
PackageToJS: Use released UWASI 1.5.2 and stabilize sleep test
a5cbe7a
@krodak
krodak marked this pull request as ready for review September 7, 2026 11:13
@krodak
krodak requested a review from kateinoigakukun September 7, 2026 11:13
kateinoigakukun
kateinoigakukun approved these changes Sep 7, 2026
View reviewed changes
@krodak
krodak merged commit 991755e into swiftwasm:main Sep 7, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kateinoigakukun kateinoigakukun kateinoigakukun approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@krodak krodak

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@krodak @kateinoigakukun
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.