Skip to content

Commit 30848e8

Browse files
authored
Cap'n Web integration (#83)
- Cap'n Web upstream based on cloudflare/capnweb#162, with extra commits to: - (a) unwrap RpcStubs that point back to local objects (getLocalTarget) - (b) replay record/replay closures synchronously instead of eagerly Promisifying them (so fully-local chains run sync end to end), plus allow zero-arg closures - @expose <-> RpcTarget translation exposing only the members we manually @expose, and crucially unwrapping RpcStubs that point to local objects (the record-replay closures) back to their raw builder objects
1 parent ef67429 commit 30848e8

17 files changed

Lines changed: 9697 additions & 2859 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
1214
- uses: DeterminateSystems/nix-installer-action@main
1315
- uses: DeterminateSystems/magic-nix-cache-action@main
1416
- name: Start Postgres and run checks
@@ -26,7 +28,7 @@ jobs:
2628
else
2729
RUN=(bash -c)
2830
fi
29-
"${RUN[@]}" "cd '$PWD' && nix develop --command bash -c 'set -e; bin/startpg; npm ci; (cd examples/basic && npm ci); (cd site && npm ci); npm run codegen:check; npm run build; npm run check; (cd site && npm run typecheck && npm run test)'"
31+
"${RUN[@]}" "cd '$PWD' && nix develop --command bash -c 'set -e; bin/startpg; (cd packages/capnweb && npm ci && npm run build); npm ci; (cd examples/basic && npm ci); (cd site && npm ci); npm run codegen:check; npm run build; npm run check; (cd site && npm run typecheck && npm run test)'"
3032
3133
site:
3234
needs: check
@@ -41,11 +43,14 @@ jobs:
4143
url: ${{ steps.deployment.outputs.page_url }}
4244
steps:
4345
- uses: actions/checkout@v4
46+
with:
47+
submodules: recursive
4448
- uses: DeterminateSystems/nix-installer-action@main
4549
- uses: DeterminateSystems/magic-nix-cache-action@main
4650
- run: |
4751
nix develop --command bash -c '
4852
set -euo pipefail
53+
(cd packages/capnweb && npm ci && npm run build)
4954
npm ci
5055
(cd site && npm ci && npm run build)
5156
'
@@ -64,6 +69,8 @@ jobs:
6469
contents: write # for pushing the tag
6570
steps:
6671
- uses: actions/checkout@v4
72+
with:
73+
submodules: recursive
6774
- uses: DeterminateSystems/nix-installer-action@main
6875
- uses: DeterminateSystems/magic-nix-cache-action@main
6976
- name: Decide whether to release
@@ -83,6 +90,7 @@ jobs:
8390
run: |
8491
nix develop --command bash -c '
8592
set -euo pipefail
93+
(cd packages/capnweb && npm ci && npm run build)
8694
npm ci
8795
npm run build
8896
npm publish

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "packages/capnweb"]
2+
path = packages/capnweb
3+
url = https://github.com/ryanrasti/capnweb.git
4+
branch = typegres-compat

0 commit comments

Comments
 (0)