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

Support custom path-mapped dependencies #78

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

weijiekoh
Copy link

@weijiekoh weijiekoh commented Mar 25, 2021

This PR allows circom to recognise custom path-mapped dependencies so this works:

circom ./foo.circom -a @customlib=./path/to/customlib/
include "@customlib/bar.circom";

This benefits developers who publish circom files to NPM. The way node_modules is laid out prevents a circom file in one module from correctly importing a circom file in another module. By specifying custom path-maps, developers can sidestep this problem.

It includes a simple Mocha test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant