Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# Owns the rev derivation, the rev-keyed tools cache, the
# install, and the pins gate; the justfile's _ct-tools
# recognizes the stamped install and does not repeat it.
uses: polymorph-components/polymorph-test/actions/setup@3ec431717895b2e4fa81500794e0da7fd13e26e7
uses: polymorph-components/polymorph-test/actions/setup@b4444a25a22106ad4128549bdc9e579552e62210
with:
tools: component-test-cli
js-locks: |
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
# against the pin.
- name: Publish the conformance matrix
if: always() && hashFiles('conformance/driver-ct/results/*.jsonl') != ''
uses: polymorph-components/polymorph-test/actions/aggregate@3ec431717895b2e4fa81500794e0da7fd13e26e7
uses: polymorph-components/polymorph-test/actions/aggregate@b4444a25a22106ad4128549bdc9e579552e62210
with:
lock: conformance/guest-ct/tests.lock
manifest: conformance/driver-ct/targets.toml
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ default-members = [
# .github/workflows/ci.yml`, then `cargo update component-test-sdk
# component-test-runner` and `pnpm --dir conformance/driver-ct/deltic
# install`; the _ct-tools pins gate and the CI ref guard fail on skew.
component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "3ec431717895b2e4fa81500794e0da7fd13e26e7" }
component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "3ec431717895b2e4fa81500794e0da7fd13e26e7" }
component-test-sdk = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" }
component-test-runner = { git = "https://github.com/polymorph-components/polymorph-test", rev = "b4444a25a22106ad4128549bdc9e579552e62210" }
anyhow = "1"
bytes = "1"
futures = "0.3"
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ holds them to one behavior. Open questions and findings are tracked in the

[`tokio-tungstenite`]: https://github.com/snapview/tokio-tungstenite

## Releases

Everything here is **unstable** (0.x), but [releases](../../releases) are
**caret-honest**: within a minor line they stay backward-compatible, and
anything breaking bumps the minor. Consumption is pinned at a release's
commit — cargo git dependencies, vendored WIT, the release-pinned
deltic/JSR graph — and bumped deliberately.

## Why this exists

WebAssembly components have no standard WebSocket path today: `wasi:http`
Expand Down
6 changes: 3 additions & 3 deletions conformance/driver-ct/deltic/browser-bundle-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// map — the single deltic pin site), the emitted module is what
// browser/worker-entry.ts imports as `@deltic/release-bundle-entry`
// used to. Same export surface: instantiate/Translator/runSuite/
// wasiShims/ComponentException/artifactsFromEnvelope and friends (49 exports
// wasi/ComponentException/artifactsFromEnvelope and friends (49 exports
// verified against the retired upstream entry).
export * from "@deltic/runtime/embedder";
export { Translator } from "@deltic/runtime/shim";
export * from "@deltic/ct-runner";
export { wasiShims } from "@deltic/wasi-shims";
export type { WasiShims, WasiShimsOptions } from "@deltic/wasi-shims";
export { wasi } from "@deltic/wasi";
export type { WasiImports, WasiOptions } from "@deltic/wasi";
12 changes: 6 additions & 6 deletions conformance/driver-ct/deltic/deno.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"//": "MODULE-IDENTITY CONSTRAINT: deltic's wasi-shims module imports @deltic/runtime/embedder by bare specifier internally. The @deltic/runtime/embedder entry here must map to the IDENTICAL exact-pinned JSR version as ../../../js/deltic/deno.json's entry, or the embedder module loads twice and `instanceof ComponentException` stops holding across the module boundary. Pin story: 0.1.0-pre.ga2f84a5 names one upstream deltic commit; @deltic/translator ships the translator wasm for that SAME commit; deno.lock carries integrity, --frozen enforced everywhere; one version repo-wide is asserted by the pin gate (justfile: exam-deltic).",
"//": "MODULE-IDENTITY CONSTRAINT: deltic's wasi module imports @deltic/runtime/embedder by bare specifier internally. The @deltic/runtime/embedder entry here must map to the IDENTICAL exact-pinned JSR version as ../../../js/deltic/deno.json's entry, or the embedder module loads twice and `instanceof ComponentException` stops holding across the module boundary. Pin story: exact-pinned JSR releases (caret-honest upstream: within a minor line releases stay compatible, breaking bumps the minor; per-commit `<next>-pre.g<hash>` prereleases exist between releases — pin exactly); @deltic/translator ships the translator wasm for that SAME commit; deno.lock carries integrity, --frozen enforced everywhere; one version repo-wide is asserted by the pin gate (justfile: exam-deltic).",
"imports": {
"@deltic/ct-runner": "jsr:@deltic/ct-runner@0.1.0-pre.ga2f84a5",
"@deltic/runtime/embedder": "jsr:@deltic/runtime@0.1.0-pre.ga2f84a5/embedder",
"@deltic/runtime/shim": "jsr:@deltic/runtime@0.1.0-pre.ga2f84a5/shim",
"@deltic/wasi-shims": "jsr:@deltic/wasi-shims@0.1.0-pre.ga2f84a5",
"@deltic/translator": "jsr:@deltic/translator@0.1.0-pre.ga2f84a5",
"@deltic/ct-runner": "jsr:@deltic/ct-runner@0.1.0",
"@deltic/runtime/embedder": "jsr:@deltic/runtime@0.1.0/embedder",
"@deltic/runtime/shim": "jsr:@deltic/runtime@0.1.0/shim",
"@deltic/wasi": "jsr:@deltic/wasi@0.1.0",
"@deltic/translator": "jsr:@deltic/translator@0.1.0",
"@polymorph/component-test-js/deltic-worker-main": "./node_modules/@polymorph/component-test-js/js/runner-deltic/worker-main.mjs"
},
"minimumDependencyAge": { "age": "P1D", "exclude": ["jsr:@deltic/*"] },
Expand Down
40 changes: 20 additions & 20 deletions conformance/driver-ct/deltic/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion conformance/driver-ct/deltic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"description": "Node driver + bundled worker inputs for the deltic-browser conformance row: the suite runtime-linked inside headless Chromium with this repo's deltic host module, through the upstream page driver and deltic worker-main.",
"dependencies": {
"@polymorph/component-test-js": "github:polymorph-components/polymorph-test#3ec431717895b2e4fa81500794e0da7fd13e26e7",
"@polymorph/component-test-js": "github:polymorph-components/polymorph-test#b4444a25a22106ad4128549bdc9e579552e62210",
"playwright-core": "^1.61.1"
}
}
12 changes: 6 additions & 6 deletions conformance/driver-ct/deltic/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions conformance/driver-ct/deltic/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// `connections.setMaxInboundBufferBytes(…)` | `configure({ … })`, same values
// `spawnEchod(bin)` scraping LISTENING | `spawnEchod()`, same scrape
// `unreachableUrl()` (bind port 0, release) | same
// `env = [[WS_CONFORMANCE_*, …]]` | `wasiShims({ cli: { env } })`
// `env = [[WS_CONFORMANCE_*, …]]` | `wasi({ cli: { env } })`
// `runSuite(...)` (component-test-js) | `runSuite(...)` (ct-runner)
// `NODE_EXTRA_CA_CERTS=…/tls/ca.pem` | `DENO_CERT=…/tls/ca.pem`
//
Expand All @@ -27,7 +27,7 @@
// excluded: the TLS leg runs headlessly under Deno exactly as the ws:
// leg does.
//
// MODULE-IDENTITY CONSTRAINT: deltic's wasi-shims module imports
// MODULE-IDENTITY CONSTRAINT: deltic's wasi module imports
// `@deltic/runtime/embedder` by bare specifier internally; this leg's
// `deno.json` AND `js/deltic/deno.json` must map that specifier to the
// IDENTICAL exact-pinned JSR version, or the embedder module loads twice
Expand All @@ -47,7 +47,7 @@ import { Translator } from "@deltic/runtime/shim";
import type { ComponentArtifacts } from "@deltic/runtime/embedder";
import { defaultTranslator } from "@deltic/translator";
import { runSuite } from "@deltic/ct-runner";
import { wasiShims } from "@deltic/wasi-shims";
import { wasi } from "@deltic/wasi";
import { configure, websocketImports } from "../../../js/deltic/websocket.ts";

// This file sits at conformance/driver-ct/deltic/run.ts, so the repo
Expand Down Expand Up @@ -217,7 +217,7 @@ async function main() {

const artifacts = await loadArtifacts(cli.translator);
const imports = {
...wasiShims({ cli: { env, passthrough: false } }),
...wasi({ cli: { env, passthrough: false } }),
...websocketImports(),
};

Expand Down
4 changes: 2 additions & 2 deletions examples/deltic-demo/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Translator } from "@deltic/runtime/shim";
import type { ComponentArtifacts } from "@deltic/runtime/embedder";
import { ComponentException, instantiate } from "@deltic/runtime/embedder";
import { defaultTranslator } from "@deltic/translator";
import { wasiShims } from "@deltic/wasi-shims";
import { wasi } from "@deltic/wasi";
import { websocketImports } from "../../js/deltic/websocket.ts";

// This file sits at examples/deltic-demo/run.ts, so the repo root is two
Expand Down Expand Up @@ -113,7 +113,7 @@ async function main() {
console.error(`echo server ready at ${echod.base}`);
try {
const instance = await instantiate(artifacts, {
...wasiShims(),
...wasi(),
...websocketImports(),
});
const demo = instance.exports[DEMO_INTERFACE] as {
Expand Down
6 changes: 3 additions & 3 deletions js/componentize/wpt/parity/deltic-carrier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// legs.mjs must not import `../reporter.js` itself.
//
// THE DELTIC PIN IS SINGLE-SITE: this module resolves `@deltic/*` through
// conformance/driver-ct/deltic/deno.json (exact-pinned JSR prereleases;
// conformance/driver-ct/deltic/deno.json (exact-pinned JSR releases;
// the bundle recipe runs `deno bundle` from that directory) and the
// translator asset is extracted from the packaged `@deltic/translator`
// JSR package's lock-pinned module cache (no fetch step). Bundling from
Expand All @@ -29,7 +29,7 @@

import { Translator } from "@deltic/runtime/shim";
import { instantiate } from "@deltic/runtime/embedder";
import { wasiShims } from "@deltic/wasi-shims";
import { wasi } from "@deltic/wasi";
import { websocketImports } from "../../../deltic/websocket.ts";
import { reporter, setSink } from "../reporter.js";
import { socketsStubs } from "./sockets-stub-deltic.mjs";
Expand Down Expand Up @@ -60,7 +60,7 @@ export async function instantiateRunner(
const translator = await Translator.create(translatorBytes);
const { plan, adapters } = translator.translate(componentBytes);
const instance = await instantiate({ plan, componentBytes, adapters }, {
...wasiShims(),
...wasi(),
...socketsStubs(),
// The host module under test: the same import-record assembly the
// conformance leg uses (conformance/driver-ct/deltic/run.ts).
Expand Down
6 changes: 3 additions & 3 deletions js/componentize/wpt/parity/sockets-stub-deltic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// instantiation.
//
// The componentize-js runtime imports the seven `wasi:sockets@0.2`
// interfaces unconditionally, and deltic's `wasiShims()` deliberately
// interfaces unconditionally, and deltic's `wasi()` deliberately
// excludes sockets (mission scope: p2 baseline + p3 clocks). The parity
// runner never opens a socket — every WebSocket it drives goes through
// `polymorph:websocket/connections` — so every member here exists only to
Expand All @@ -13,7 +13,7 @@
// This is the deltic-keyed reshape of the jco-era `sockets-stub.mjs`
// (same inventory, same throw-if-reached posture; removed with the jco
// legs, see git history). Keys are compatibility-**track** keys (`@0.2`),
// the same registration form `@deltic/wasi-shims` uses, so one provider
// the same registration form `@deltic/wasi` uses, so one provider
// serves whichever 0.2.x minor the guest's binary happens to name
// (contracts/embedder-api.md §"Version canonicalization").

Expand All @@ -34,7 +34,7 @@ export class UdpSocket extends StubResource {}
export class IncomingDatagramStream extends StubResource {}
export class OutgoingDatagramStream extends StubResource {}

/** The imports-record fragment: `{ ...socketsStubs() }` beside `wasiShims()`. */
/** The imports-record fragment: `{ ...socketsStubs() }` beside `wasi()`. */
export function socketsStubs() {
return {
"wasi:sockets/instance-network@0.2": {
Expand Down
Loading
Loading