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
2 changes: 1 addition & 1 deletion experiments/iroh-relay-ws/host/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Connections are keyed by the guest socket that carries them (one relay
// connection = one synthetic socket = one websocket).

import { Websocket } from "../../../.deps/websocket/js/polyengine/websocket.ts";
import { Websocket } from "@polymorph/websocket";
import type { OutgoingDatagram, UdpSocket } from "./sockets.ts";
import { pushDatagram, registerBridge } from "./sockets.ts";
import { describeErr } from "./errors.ts";
Expand Down
9 changes: 4 additions & 5 deletions experiments/iroh-relay-ws/host/deno.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"//": "MODULE-IDENTITY CONSTRAINT: polyengine's wasi package and the sibling polyengine host modules (.deps/{websocket,webrtc}) import @polyengine/runtime/embedder by bare specifier internally; this file maps that specifier ONCE for the whole module graph, so `instanceof ComponentException` holds across every boundary. This is the ONE deno config for all three experiments (iroh-relay-ws, iroh-blobs, ping-demo): the others pass --config pointing here. polyengine arrives as 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; @polyengine/translator ships the translator wasm for the SAME commit); the version matches host-polyengine/deno.json by repo convention (exam-polyengine asserts it; see host-polyengine/README.md, 'The pin'). minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @polyengine publishes resolve. The npm mappings serve the webrtc module's bare specifiers under Deno; a browser build resolves the RTCPeerConnection global instead. compilerOptions.lib carries dom next to deno.ns so the browser entries (browser-entry.ts, ping-demo's demo.ts/overlay.ts) type-check in the same graph as the Deno drivers.",
"//": "MODULE-IDENTITY CONSTRAINT: polyengine's wasi package and the sibling @polymorph host modules (JSR) import @polyengine/runtime/embedder by bare specifier internally; this file maps that specifier ONCE for the whole module graph, so `instanceof ComponentException` holds across every boundary. This is the ONE deno config for all three experiments (iroh-relay-ws, iroh-blobs, ping-demo): the others pass --config pointing here. polyengine arrives as 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; @polyengine/translator ships the translator wasm for the SAME commit); the version matches host-polyengine/deno.json by repo convention (exam-polyengine asserts it; see host-polyengine/README.md, 'The pin'). The @polymorph packages are exact-pinned the same way. minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @polyengine/@polymorph publishes resolve. The webrtc module's npm dependencies (node-datachannel, werift) arrive through @polymorph/webrtc-datachannels' own manifest; a browser build externalizes them and resolves the RTCPeerConnection global instead. compilerOptions.lib carries dom next to deno.ns so the browser entries (browser-entry.ts, ping-demo's demo.ts/overlay.ts) type-check in the same graph as the Deno drivers.",
"nodeModulesDir": "auto",
"minimumDependencyAge": {
"age": "P1D",
"exclude": ["jsr:@polyengine/*"]
"exclude": ["jsr:@polyengine/*", "jsr:@polymorph/*"]
},
"compilerOptions": {
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"]
Expand All @@ -14,9 +14,8 @@
"@polyengine/translator": "jsr:@polyengine/translator@0.3.0",
"@polyengine/wasi": "jsr:@polyengine/wasi@0.3.0",
"@polyengine/wasi/io": "jsr:@polyengine/wasi@0.3.0/io",
"node-datachannel": "npm:node-datachannel@0.32.3",
"node-datachannel/polyfill": "npm:node-datachannel@0.32.3/polyfill",
"werift": "npm:werift@0.22.2"
"@polymorph/webrtc-datachannels": "jsr:@polymorph/webrtc-datachannels@0.3.0",
"@polymorph/websocket": "jsr:@polymorph/websocket@0.3.0"
},
"tasks": {
"check": "deno check ."
Expand Down
20 changes: 18 additions & 2 deletions experiments/iroh-relay-ws/host/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 experiments/iroh-relay-ws/host/webrtc-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
DataChannelOptions,
PeerConnection,
PeerConnectionConfig,
} from "../../../.deps/webrtc/polyengine-impl/src/webrtc.ts";
} from "@polymorph/webrtc-datachannels";
import type { IpSocketAddress, OutgoingDatagram, UdpSocket } from "./sockets.ts";
import {
pushDatagram,
Expand Down
2 changes: 1 addition & 1 deletion experiments/ping-demo/web/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
DataChannelOptions,
PeerConnection,
PeerConnectionConfig,
} from "../../../.deps/webrtc/polyengine-impl/src/webrtc.ts";
} from "@polymorph/webrtc-datachannels";
import type { IpSocketAddress, OutgoingDatagram, UdpSocket } from "../../iroh-relay-ws/host/sockets.ts";
import {
pushDatagram,
Expand Down
3 changes: 1 addition & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ interop-prod: build
# bootstrap over the polymorph-websocket sibling's polyengine module, then
# live migration onto a WebRTC data channel through the synthetic-address
# overlay (issue #26). Research probe attached to the issue, so manual:
# not part of `ci`. The host's sibling polyengine module imports await the
# JSR migration (issue #83).
# not part of `ci`.
iroh-relay-ws:
cd experiments/iroh-relay-ws/guest && cargo build --release
cd experiments/iroh-relay-ws/host && deno install --frozen --allow-scripts=npm:node-datachannel
Expand Down
Loading