Skip to content

Enable end-to-end .eph -> .wasm compile in build-gossamer-gui #196

Closed as not planned

Description

@hyperpolymath

Follow-up to #177. The Ephapax toolchain itself builds in CI (pinned to c14c3e92, cached per-SHA), but the actual compile of src/ui/gossamer/bridge.eph to src/ui/public/assets/wasm/hypatia_gui.wasm is currently skipped with a ::warning:: because Ephapax v1.0.0 has no stage-1 CLI subcommand. See .github/workflows/build-gossamer-gui.yml:191-205 and src/ui/gossamer/README.adoc:70-77.

Definition of done:

  • Workflow's "Attempt to compile bridge.eph" step succeeds (not skipped) and produces hypatia_gui.wasm in the artifact upload.
  • wasm-validate passes on the produced artifact.
  • src/ui/gossamer/loader.js TODOs resolved: replace the wasi_snapshot_preview1 stub with the real Gossamer host imports, and verify the string ABI (currently assumes {ptr, len-prefix-i32}) matches what Ephapax actually emits.
  • index.html loads the wasm in a real browser without console errors against a running Hypatia backend (or this is documented as a manual smoke step).

Blocked by: hyperpolymath/ephapax#36 (CLI subcommand). The workflow already auto-promotes when any of just compile-affine, ephapax-cli compile-eph, or ephapax-cli compile-affine exists upstream — so the hypatia-side change after the upstream lands is mostly verification + the loader.js follow-throughs.

Activity

  1. added
    enhancement
    github_actions
    on Apr 30, 2026
  2. hyperpolymath commented on May 13, 2026

    @hyperpolymath
    OwnerAuthor

    Status check (2026-05-13):

    Still blocked on upstream hyperpolymath/ephapax#36 — no commits, comments, or PRs against that issue. The blocker hasn't moved.

    The hypatia-side scaffolding is ready and self-promoting: .github/workflows/build-gossamer-gui.yml (lines 191-205 region) already probes for just compile-affine, ephapax-cli compile-eph, and ephapax-cli compile-affine and will switch from the ::warning:: skip to a real compile the moment any of those land upstream. src/ui/gossamer/loader.js TODOs (wasi_snapshot_preview1 stub, string ABI) remain the only hypatia-internal items, and those can't be validated without an actual compiled .wasm artefact to test against.

    Action options:

    1. Leave as-is. Workflow continues to emit the ::warning:: skip; this issue stays open and tracks the post-unblock verification. Lowest-risk; deferred until ephapax has a stage-1 CLI.
    2. Drive the unblock from ephapax side. Implement ephapax-cli compile-eph <in.eph> -o <out.wasm> as a thin shell over the Idris2 parser + existing compile-sexpr. Substantial standalone change (touches the Rust CLI crate + Idris2 parser glue) — best handled as its own session focused on ephapax, not bolted into a hypatia PR.
    3. Mock the wasm output for loader smoke testing. Hand-write a minimal Gossamer-compatible .wasm to exercise loader.js and lock in the host-import shape without waiting on the toolchain. Would unblock the loader.js TODOs but doesn't close this issue (the goal is a real end-to-end compile).

    Recommendation: option 1 until someone is ready to take a focused pass at ephapax#36; this issue tracks the work that lands on the hypatia side once upstream has a CLI to call.

  3. hyperpolymath commented on May 13, 2026

    @hyperpolymath
    OwnerAuthor

    Closing this issue. Tracking moved to hyperpolymath/ephapax#36 -- the blocking work is the stage-1 .eph -> .wasm CLI subcommand on ephapax, not anything actionable on the hypatia side.

    When ephapax#36 lands, the hypatia-side follow-through is:

    • .github/workflows/build-gossamer-gui.yml already auto-promotes: probes for just compile-affine, ephapax-cli compile-eph, and ephapax-cli compile-affine in that order and switches from the ::warning:: skip to a real compile as soon as one of those names exists upstream. No hypatia code change is required at that step.
    • src/ui/gossamer/loader.js still has two TODOs that can only be validated against a real compiled .wasm artefact: the wasi_snapshot_preview1 stub replacement and the string-ABI verification (currently assumes {ptr, len-prefix-i32}).

    Reopen with a new title (e.g. "verify loader.js host imports + string ABI against real Ephapax-compiled wasm") when ephapax#36 merges and there's a .wasm to test against. Until then there's nothing actionable on this repo.

  4. hyperpolymath commented on May 13, 2026

    @hyperpolymath
    OwnerAuthor

    Reopened — actively working on ephapax#36 unblock now.

  5. hyperpolymath commented on May 13, 2026

    @hyperpolymath
    OwnerAuthor

    Closing (again, with sharper scope this time):

    Traced the actual gate end-to-end -- it isn't a CLI-naming gap on ephapax. Neither parser (Rust ephapax-parser nor Idris2 Ephapax.Parse.Parser) knows the v2 keywords that bridge.eph requires: module, import, extern, data, match, let! (Rust). Adding a compile-eph alias on the existing Compile would actively hurt this workflow -- it would short-circuit build-gossamer-gui.yml's compile branch (which currently emits the structured ::warning:: about v2 grammar) and replace it with a silent parser error. So the original "thin shell over Idris2 + compile-sexpr" framing in ephapax#36 was off-target.

    Filed hyperpolymath/ephapax#43 -- "Implement v2 grammar (module/import/extern/data/match/let!) in Rust + Idris2 parsers" -- with the full scope: lexer keyword adds, AST nodes (ModuleDecl, ImportDecl, ExternBlock, DataDecl, MatchExpr, LetBangExpr), parser productions, typechecker hooks, IR-emit notes, and a test corpus (including a copy of bridge.eph as the golden integration). Posted a scope correction on hyperpolymath/ephapax#36 redirecting the parser work there to #43.

    The hypatia-side workflow needs no change. build-gossamer-gui.yml's probe order (just compile-affine -> ephapax compile-eph -> ephapax compile-affine -> ephapax compile) already auto-promotes the moment the v1.0.0 compile subcommand starts accepting v2 grammar. The loader.js TODOs (wasi_snapshot_preview1 stub, string ABI verification) need a real compiled .wasm to validate against; that's the post-#43 follow-through.

    Reopen this issue after ephapax#43 lands and ephapax can compile a v2 .eph. Until then there's nothing actionable on this repo. Tracking lives in ephapax#43.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgithub_actionsgossamerui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions