Skip to content

arigl-web: what a conference client needs comes from the page config - #989

Merged
transfix merged 5 commits into
masterfrom
feat/ariadne-conference-web
Nov 3, 2026
Merged

transfix merged 5 commits into
masterfrom
feat/ariadne-conference-web

Conversation

@transfix

@transfix transfix commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

The stock arigl-web page can now run an Ariadne conference. A conference app becomes .ari documents plus an ariadne.config.json on the published package, with no build of its own.

cyprty moves out of libcvc this way, into its own public repository, cy-pca/cyprty, which holds only its documents and deploy code. Until now, cyprty was its own wasm build (cyprty) with a hand-written page, src/arigl/web/cyprty.html. Everything that page did by hand is now generic page config.

The page config (arigl-web.js, documented in arigl-web.html and docs/CVCGL_WASM.md)

  • Placeholders in flags, config args and now env values:

    • {origin}: the page's origin;
    • {ws_origin}: the same host as a WebSocket origin (wss:// on an https page, ws:// on http);
    • {random}: five characters, the same everywhere in one page load.

    For example "CVC_ARIADNE_RELAY": "{ws_origin}/conference-ws" and "CVC_ARIADNE_NAME": "guest-{random}".

  • url_env / fragment_env: which ?param= (or #param=, which the browser never sends to a server) may set which env variable.

    • A rule can add a regular expression (match), a length cap (max) and a switch value (value).
    • Parameters the config doesn't name are ignored, so a link sets only what the config allows.
    • No rule can set the page's own keys.
  • device_identity: a random device id and key for the browser, as CVC_DEVICE_ID / CVC_DEVICE_KEY.

    • They're kept in localStorage under the names cyprty's page used, so a browser keeps its identity (and its relay pin) through the move.
  • Audio unlock: every AudioContext resumes on the first click, key or touch. Browsers start them suspended, which kept SDL's output (a peer's voice) silent.

  • fullscreen_button: a small button in the corner.

The recipe (cvcpkg/recipes/arigl-web)

The single-threaded package is now built with:

  • the WebSocket transport (CVC_ENABLE_WS, protobuf);
  • Jolt for the avatars;
  • Opus for mics;
  • device keys (openssl).

build-wasm.sh builds the conference in when the deps prefix has protobuf, and then fails the build without any of the others. Without protobuf it says the package can't run a conference, and cy-pca/cyprty's staging refuses such a package. CI installs the recipe's deps from cvcpkg.org, which publishes protobuf 28.3+cvc.2 for wasm since cy-pca/cvcpkg#541, so CI builds the conference in. The wasm protobuf ships no protoc, so the messages are generated by a native protoc 28.3: protobuf is the recipe's host tool, and CI installs it beside cmake and ninja. The threaded package is unchanged, because libopus has no -pthread wasm build.

Deps on cvcpkg.org: protobuf 28.3+cvc.2 (with abseil 20240722.0+cvc.5 and zlib), libopus 1.6.1+cvc.8, joltphysics 5.6.0+cvc.6 and openssl 3.4.1+cvc.6 are all published for wasm. protobuf's wasm column, added in cy-pca/cvcpkg#452, never packed until cy-pca/cvcpkg#541 scoped its protoc globs to native platforms. The package version comes from the next libcvc release.

Tests

  • A harness on the real page and script (a stub arigl.js reads back the module's environment and arguments). 18 of 18 checks pass:
    • placeholders in env and args;
    • ?name trimmed, and the guest-{random} default;
    • ?look and ?synthetic match rules, including refusals;
    • an unlisted ?relay= ignored;
    • a rule can't set the page's own CVC_ARIADNE_PRELOAD;
    • #token read from the fragment;
    • src pinned;
    • the device id and key kept across loads;
    • the button.
  • End to end: the stock arigl target built for wasm on catx-03 with this branch, against the same deps prefix the cyprty builds used. The configure reported the WebSocket transport, Jolt, Opus and device keys, the lines build-wasm.sh now requires.
    • I staged it with cy-pca/cyprty's own stage.sh (cyprty's main.ari and config) and loaded it in headless Chrome against a local arisrv.
    • The page joined through the config's ?relay= rule as ?name=stocktest.
    • Synthetic camera frames reached the relay.
    • Mouse look worked: standing turns, turns while walking and sweeps reached the relay exactly as with the old cyprty build.

Not in this PR

The stock arigl-web page could not run an Ariadne conference: cyprty did it with its own page
(src/arigl/web/cyprty.html) and its own wasm build. Everything that page did by hand is now
generic page config, so a conference app is documents plus an ariadne.config.json on the stock
package (cyprty is moving to its own repository, cy-pca/cyprty, that way):

- Placeholders in flags, config args and now env values: {origin}, {ws_origin} (wss:// on an
  https page, ws:// on http) and {random} (five characters, one per page load). For example
  CVC_ARIADNE_RELAY = "{ws_origin}/conference-ws", CVC_ARIADNE_NAME = "guest-{random}".
- url_env / fragment_env: which ?param= (or #param=, never sent to a server) may set which env
  variable, with an optional regular expression, length cap and switch value. Parameters the
  config does not name are ignored, and no rule can set the page's own keys.
- device_identity: a random device id and key for the browser, kept in localStorage under the
  names cyprty's page used (cvc.device_id, cvc.device_key), so a browser keeps its identity.
- The audio unlock: every AudioContext resumes on the first click, key or touch. Browsers start
  them suspended, which silenced SDL's output (a conference peer's voice).
- fullscreen_button: a small corner button.

The arigl-web recipe builds the single-threaded package with the WebSocket transport
(CVC_ENABLE_WS, protobuf), Jolt, Opus and device keys (openssl), and fails that build without
any of them. The threaded package stays as it was: protobuf and libopus have no -pthread wasm
builds.

Checked: a harness runs the real page and script with a stub arigl.js and reads back the
module's environment and arguments. 18 of 18 checks pass: placeholders, URL and fragment rules
with their matches, ignored and refused parameters, the pinned src, the device identity kept
across loads, and the button.
transfix added a commit to cy-pca/cyprty that referenced this pull request Nov 3, 2026
CI installs the recipe's wasm deps from cvcpkg.org, which has no wasm protobuf yet, so turning the
WebSocket transport on unconditionally failed the configure. The single-threaded build now turns it
on, and requires Jolt, Opus and device keys, when the deps prefix has protobuf; without it the build
says the package cannot run an Ariadne conference. A site that needs one (cy-pca/cyprty) refuses
such a package at staging.
cvcpkg.org publishes protobuf 28.3+cvc.2 for wasm (and wasm-mt) since
cy-pca/cvcpkg#541, so the recipe's deps bring it and build-wasm.sh builds the
conference in. The comments that said it was unpublished, and that protobuf had
no -pthread wasm build, are corrected; libopus is what keeps the conference out
of the threaded package.
With the wasm protobuf in the prefix the build turns WS on, and configure then
stops at find_program(protoc) (CI/CD run 41613012579): the wasm bundle ships no
protoc, and the messages must be generated by a native protoc of the same
version (28.3).

- recipe.yaml: protobuf joins host_tools, so a cross build gets protoc on PATH
  from the build prefix.
- ci.yml: the arigl-web job installs protobuf beside cmake and ninja in its
  tools prefix, which is on PATH. Emscripten's toolchain finds programs on the
  host only and packages in the wasm prefix only, so the native protobuf's
  CMake config does not shadow the wasm one.
- build-wasm.sh: with WS on, fail early without protoc on PATH, and log which
  protoc it uses.

The linux protobuf 28.3+cvc.2 bundle's protoc runs from a relocated prefix
(RUNPATH $ORIGIN/../lib; `protoc --version` is libprotoc 28.3).
@transfix
transfix merged commit 8775f23 into master Nov 3, 2026
23 of 27 checks passed
@transfix
transfix deleted the feat/ariadne-conference-web branch November 3, 2026 18:45
transfix added a commit that referenced this pull request Nov 4, 2026
#989 made arigl-web build the WebSocket transport, whose messages are generated by a native protoc (the recipe's host tool; the wasm protobuf ships none). ci.yml's arigl-web job installs protobuf beside cmake/ninja, but the publish job did not, so v3.7.9's arigl-web (wasm) leg stopped at build-wasm.sh's check: "the WebSocket transport needs a native protoc on PATH".
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