mirror of
https://github.com/logos-storage/nim-circom-compat.git
synced 2026-01-02 13:43:13 +00:00
bump ffi
This commit is contained in:
parent
8418c36fc4
commit
e2abbb034e
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -7,14 +7,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
nim: [stable, 1.6.16, 1.4.8, 1.2.18]
|
||||
nim: [1.6.18, 1.4.8, 1.2.18]
|
||||
toolchain:
|
||||
- stable
|
||||
# - beta
|
||||
# - nightly
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'true'
|
||||
- uses: iffy/install-nim@v3
|
||||
|
||||
- name: Install Nim
|
||||
uses: asdf-vm/actions/install@v3
|
||||
with:
|
||||
version: ${{ matrix.nim }}
|
||||
tool_versions: |
|
||||
nim ${{ matrix.nim }}
|
||||
|
||||
- name: Build
|
||||
run: nimble install -y
|
||||
- name: Test
|
||||
|
||||
@ -17,6 +17,6 @@ static:
|
||||
if exitCode != 0:
|
||||
raiseAssert("Failed to build circom-compat-ffi")
|
||||
|
||||
{.passl: "-lcircom_compat_ffi" & " -L" & libDir.}
|
||||
{.passl: "-lcircom_compat_ffi -lm" & " -L" & libDir.}
|
||||
|
||||
include circomcompatffi
|
||||
|
||||
@ -20,6 +20,16 @@ const ERR_FAILED_TO_DESERIALIZE_PROOF* = 8
|
||||
|
||||
const ERR_FAILED_TO_DESERIALIZE_INPUTS* = 9
|
||||
|
||||
const ERR_FAILED_TO_VERIFY_PROOF* = 10
|
||||
|
||||
const ERR_GET_PUB_INPUTS* = 11
|
||||
|
||||
const ERR_MAKING_PROOF* = 12
|
||||
|
||||
const ERR_SERIALIZE_PROOF* = 13
|
||||
|
||||
const ERR_SERIALIZE_INPUTS* = 14
|
||||
|
||||
|
||||
type CircomCompatCtx* {.incompleteStruct.} = object
|
||||
|
||||
@ -38,49 +48,51 @@ proc release_circom_compat*(ctx_ptr: ptr ptr CircomCompatCtx): void {.importc: "
|
||||
|
||||
proc release_buffer*(buff_ptr: ptr ptr Buffer): void {.importc: "release_buffer".}
|
||||
|
||||
## # Safety
|
||||
#
|
||||
proc push_input_u256_array*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input_ptr: pointer,
|
||||
len: uint): int32 {.importc: "push_input_u256_array".}
|
||||
|
||||
## # Safety
|
||||
#
|
||||
proc prove_circuit*(ctx_ptr: ptr CircomCompatCtx,
|
||||
compress: bool,
|
||||
proof_bytes_ptr: ptr ptr Buffer,
|
||||
inputs_bytes_ptr: ptr ptr Buffer): int32 {.importc: "prove_circuit".}
|
||||
|
||||
## # Safety
|
||||
#
|
||||
proc verify_circuit*(ctx_ptr: ptr CircomCompatCtx,
|
||||
compress: bool,
|
||||
proof_bytes_ptr: ptr Buffer,
|
||||
inputs_bytes_ptr: ptr Buffer): int32 {.importc: "verify_circuit".}
|
||||
|
||||
proc push_input_numeric_i8*(ctx_ptr: ptr CircomCompatCtx,
|
||||
## # Safety
|
||||
#
|
||||
proc push_input_u256_array*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int8): int32 {.importc: "push_input_numeric_i8".}
|
||||
input_ptr: pointer,
|
||||
len: uint): int32 {.importc: "push_input_u256_array".}
|
||||
|
||||
proc push_input_numeric_u8*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint8): int32 {.importc: "push_input_numeric_u8".}
|
||||
proc push_input_i8*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int8): int32 {.importc: "push_input_i8".}
|
||||
|
||||
proc push_input_numeric_i16*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int16): int32 {.importc: "push_input_numeric_i16".}
|
||||
proc push_input_u8*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint8): int32 {.importc: "push_input_u8".}
|
||||
|
||||
proc push_input_numeric_u16*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint16): int32 {.importc: "push_input_numeric_u16".}
|
||||
proc push_input_i16*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int16): int32 {.importc: "push_input_i16".}
|
||||
|
||||
proc push_input_numeric_i32*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int32): int32 {.importc: "push_input_numeric_i32".}
|
||||
proc push_input_u16*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint16): int32 {.importc: "push_input_u16".}
|
||||
|
||||
proc push_input_numeric_u32*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint32): int32 {.importc: "push_input_numeric_u32".}
|
||||
proc push_input_i32*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: int32): int32 {.importc: "push_input_i32".}
|
||||
|
||||
proc push_input_numeric_u64*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint64): int32 {.importc: "push_input_numeric_u64".}
|
||||
proc push_input_u32*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint32): int32 {.importc: "push_input_u32".}
|
||||
|
||||
proc push_input_u64*(ctx_ptr: ptr CircomCompatCtx,
|
||||
name_ptr: pointer,
|
||||
input: uint64): int32 {.importc: "push_input_u64".}
|
||||
|
||||
2
vendor/circom-compat-ffi
vendored
2
vendor/circom-compat-ffi
vendored
@ -1 +1 @@
|
||||
Subproject commit 5a522239a62262f6b0fefa1f1d54a22b72da5b38
|
||||
Subproject commit aed402f6ee8a2dc225ec2db2eb36d1888aab7790
|
||||
Loading…
x
Reference in New Issue
Block a user