Skip to content

Add method-role overlay experiment on basic-webserver - #63

Open
koliyo wants to merge 7 commits into
mainfrom
method-role-lib
Open

Add method-role overlay experiment on basic-webserver#63
koliyo wants to merge 7 commits into
mainfrom
method-role-lib

Conversation

@koliyo

@koliyo koliyo commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exploratory hybrid: routes in Roc, markup in Ui.rocci. experiments/rocci-web overlays basic-webserver 0.16.0 (same tarball as dispatch.rs) and exposes pf.Rocci wraps. The gallery pf is "../rocci-web/vendor/main.roc". Run ./experiments/rocci-web/fetch-bws.sh first (vendor/ is gitignored).
  • App still matches (method, path) and calls wraps. Command empty-SSE vs 204 needs Rocci.command!(request.headers()) from main.roc; request.headers() in another module crashes this nightly.
  • A two-route List of Rocci.view / Rocci.fragment linked, then crashed at runtime (dispatch on a value that can never exist). requires { routes } does not typecheck. Hosted register needs a rebuilt libhost.a (not in this overlay).
  • Not a cutover from @method:role, not a generated-dispatch change, not an SSE-idle fork, not a shipped host. Knowledge: opinionated BWS overlay.

Test plan

  • ./experiments/rocci-web/fetch-bws.sh
  • cargo run -q -p rocci-cli -- run experiments/method-role-lib --no-window
  • GET / returns HTML; POST /actions/counter/increment is one datastar-patch-elements event
  • POST /actions/live/increment is 204 without Datastar-Request and empty SSE with it
  • GET /sse stays open; GET /actions/tabs/1 is a fragment; compose returns patch-elements and patch-signals
  • GET /actions/search/results?q=live filters; GET /health is ok; GET /counter/ is 308
  • cargo run -q -p rocci-okf -- check knowledge --profile rocci --format terminal

koliyo and others added 2 commits August 25, 2026 14:01
Encode the closed method:role matrix as Roc wrap helpers and a hybrid example, without changing generated dispatch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rocci.program now returns the basic-webserver record, and view/fragment/events/unfold wraps live in Rocci.roc. Handler-capturing constructors and a List of those closures still SIGSEGV this Roc nightly, so the example keeps match dispatch and a local command wrap.

Co-authored-by: Cursor <cursoragent@cursor.com>
@koliyo koliyo changed the title Add method-role library experiment on basic-webserver Add method-role overlay experiment on basic-webserver Aug 25, 2026
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