Skip to content

Commit 3d2854a

Browse files
committed
add documentation for bindings patch (and break bindings)
1 parent 03595d4 commit 3d2854a

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/build-bindings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
nix run o1js#update-bindings --max-jobs 4
3131
#fail if this changes any files
3232
cd src/bindings
33+
echo If this check fails you can download a patch from the patch-upload job
34+
echo "https://github.com/o1-labs/o1js/blob/main/README-dev.md#build-scripts"
3335
git diff --exit-code
3436
- name: add build to gc-root if on main
3537
if: github.ref == 'refs/heads/main'

README-dev.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ In addition to building the OCaml and Rust code, the build script also generates
8686

8787
o1js uses these types to ensure that the constants used in the protocol are consistent with the OCaml source files.
8888

89+
### Bindings check in ci
90+
91+
If the bindings check fails in CI it will upload a patch you can use to update the bindings without having to rebuild locally.
92+
This can also be helpful when the bindings don't build identically, as unfortunately often happens.
93+
94+
To use this patch:
95+
- Click details on the `Build o1js bindings / build-bindings-ubunutu` job
96+
- Go to the `patch-upload` job and expand the logs for `Upload patch`
97+
- Download the file linked in the last line of the logs ie.
98+
`Artifact download URL: https://github.com/o1-labs/o1js/actions/runs/12401083741/artifacts/2339952965`
99+
- unzip it
100+
- navigate to `src/bindings`
101+
- run `git apply path/to/bindings.patch`
102+
89103
## Development
90104

91105
### Branching Policy

src/bindings

0 commit comments

Comments
 (0)