30 Commits

Author SHA1 Message Date
David Rusu
8f51c339fd rename: arm64 -> aarch64 in PIC artifact naming for triple consistency
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:00:25 -04:00
David Rusu
632ef6f643 fix: host -fPIC Linux archives from the fork instead of building from source
Building rapidsnark from source in build.rs required cmake/nasm/gmp on every
runner, which the self-hosted CI hosts lack. Instead, host pre-built -fPIC
static archives as a fork GitHub release and download them like before.

- build.rs: reverted to the download-based approach (the PIC archives are built
  on glibc 2.35 so they carry no __isoc23 references; no compat shim needed).
- download_rapidsnark.sh: Linux x86_64/arm64 now download the -fPIC rebuilds
  from this fork's `rapidsnark-pic-*` release; macOS/iOS/Android keep using the
  upstream iden3 archives (which work fine).
- Add .github/workflows/build-pic-archives.yml: builds the -fPIC archives
  (rapidsnark + GMP) inside a glibc-2.35 container and publishes/updates the
  release. Trigger by pushing a `rapidsnark-pic-*` tag or via workflow_dispatch.

Verified locally (glibc-2.35 container): the produced archives link into a
-shared cdylib with rust-lld.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 11:00:45 -04:00
David Rusu
384513f9c9 fix: build rapidsnark from source with -fPIC on glibc-Linux static
The prebuilt iden3 archives are non-PIC, so they cannot be linked into a
downstream cdylib (e.g. the node's C bindings) — rust-lld fails with
"relocation R_X86_64_PC32 ... recompile with -fPIC". They are also built
against a newer glibc (undefined __isoc23_strtoll/ull on older runners).

For the static feature on glibc-Linux, build rapidsnark from source with
CMAKE_POSITION_INDEPENDENT_CODE=ON against the host toolchain instead. This
produces PIC archives that link into a shared library and, being built against
the host glibc, removes the __isoc23 dependency — so the previous compat shim
(isoc23_compat.c) is no longer needed and is removed.

All other targets (macOS, iOS, Android) keep using the prebuilt download path.

Verified in a glibc-2.35 container: the from-source archives link into a
-shared cdylib with rust-lld and carry no __isoc23 references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 10:29:18 -04:00
David Rusu
80f5e0b661 fix: link glibc C23 strtoul/strtoll compat shim for static linking
The prebuilt iden3 rapidsnark archives are compiled on a glibc >= 2.38 host
(Ubuntu 24.04 / GCC 13), whose headers redirect strtoll/strtoull to the C23
interceptor symbols __isoc23_strtoll / __isoc23_strtoull. When the static
archives (static-rapidsnark feature) are linked on a host with an older glibc
(e.g. glibc 2.35), those symbols are undefined and linking fails:

  rust-lld: error: undefined symbol: __isoc23_strtoull

Compile thin forwarders to the classic strtoll/strtoull symbols and link them
via whole-archive so the static path resolves regardless of the host glibc
version. Gated to the static feature on glibc-Linux; the shared library and
all other targets are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 03:28:47 -04:00
Alejandro Cabeza Romero
035cca7d66
Add buffer-based prover. 2026-06-05 23:36:59 +02:00
Alejandro Cabeza Romero
f55863c73c
Simplify building, and remove duplication of linking kind. 2026-06-05 22:22:29 +02:00
Alejandro Cabeza Romero
2f45397add
Fix library directives. 2026-06-05 19:43:00 +02:00
Alejandro Cabeza Romero
6afc55339f
Refactor build.rs and add flag to force static linking on rapidsnark. 2026-06-05 18:02:49 +02:00
Alejandro Cabeza Romero
0c2f6b5ce6
Fetch rapidsnark v0.0.8. 2026-06-05 18:02:24 +02:00
Ya-wen, Jeng
3b6c78a1e5 chore: bump version to 0.1.3 and add GitHub Actions workflow for crate publishing 2025-08-18 10:07:08 +08:00
Ya-wen, Jeng
1d3c0aaebf refactor: remove Android-specific linking logic from build script 2025-08-15 14:10:36 +08:00
Ya-wen, Jeng
3c2fa9bfae v0.1.2 2025-08-15 09:23:47 +08:00
Ya-wen, Jeng
9b3c80eacc feat: integrate chkstk_stub crate and simplify iOS stub handling in build script 2025-08-14 21:19:56 +08:00
Ya-wen, Jeng
33e7c86ff5 fix: correct out_dir parameter usage in iOS stub compilation 2025-08-14 14:35:56 +08:00
Ya-wen, Jeng
8231d16df1 feat: add iOS stub source file generation in build script 2025-08-14 14:17:13 +08:00
Ya-wen, Jeng
50d71afbd0 fix: improve error messages and formatting in build script 2025-08-14 10:54:36 +08:00
Ya-wen, Jeng
d43d386e69 chore: update Rust toolchain to version 1.89.0 in README and CI configuration 2025-08-14 10:18:56 +08:00
Ya-wen, Jeng
55e4e266cf doc: update requirements 2025-03-27 14:23:51 +08:00
Ya-wen, Jeng
8e7614d256 v0.1.1 2025-03-07 11:36:43 +08:00
Ya-wen, Jeng
f1e9597e76 fix: fix init zkey path 2025-03-06 12:01:51 +08:00
Ya-wen, Jeng
fb1cd7946c fix: fix CI, fix zkey_path 2025-03-06 11:46:14 +08:00
Ya-wen, Jeng
59f134d2e8 fix: fix format zkey 2025-03-06 11:32:22 +08:00
Ya-wen, Jeng
145cc0a262 fix: don't link dylib to android and ios 2025-02-28 10:18:04 +08:00
Ya-wen, Jeng
0ef167f8a4 fix: not linking dylib to ios 2025-02-26 15:09:05 +08:00
vivianjeng
e325ebd4e4 feat: link to dylib 2025-02-26 13:18:48 +08:00
Ya-wen, Jeng
f910802118 v0.1.0 2025-02-05 20:51:03 +08:00
Ya-wen, Jeng
5f4e3afb2e remote rapidsnark binaries to upload to crates 2025-02-05 19:09:27 +08:00
Ya-wen, Jeng
d01f81e550 feat: upload to server 2025-02-05 19:00:49 +08:00
Ya-wen, Jeng
e2a33dc2bd chore: fix toolchain and platforms 2025-02-05 11:51:47 +08:00
Ya-wen, Jeng
d4a4c65d2d refactor: use tests and crates folders 2025-02-05 10:09:35 +08:00