Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for C witness tester #88

Open
erhant opened this issue Aug 2, 2024 · 2 comments
Open

Add support for C witness tester #88

erhant opened this issue Aug 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@erhant
Copy link
Owner

erhant commented Aug 2, 2024

Should be similar to how we wrap the require('circom_tester').wasm, it should wrap .c as well and use one or another based on an optional param. Can default to JS.

@erhant erhant added the enhancement New feature or request label Aug 2, 2024
@erhant
Copy link
Owner Author

erhant commented Aug 2, 2024

https://github.com/erhant/circomkit/blob/main/src/types/index.ts#L54 can add one for C here as well in case there is a difference, and use an intersection interface within Circomkit itself

@erhant
Copy link
Owner Author

erhant commented Sep 9, 2024

Prerequisites in my case (Mac M2):

  • Install nlohmann-json header that is included within the C code:
  • Install nasm
  • Install gmp (GNU Multi-precision Arithmetic Library)

Tip

If you are using Mac you can do these with brew:

# install required stuff
brew install nlohmann-json
brew install nasm
brew install gmp

# add brew to path if required, path may differ M2 / M1
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/homebrew/include/"
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
export INCLUDE_PATH="$INCLUDE_PATH:/opt/homebrew/include"

@erhant erhant pinned this issue Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant