Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Support custom path-mapped dependencies#78

Open
weijiekoh wants to merge 3 commits into
iden3:masterfrom
weijiekoh:master
Open

Support custom path-mapped dependencies#78
weijiekoh wants to merge 3 commits into
iden3:masterfrom
weijiekoh:master

Conversation

@weijiekoh

@weijiekoh weijiekoh commented Mar 25, 2021

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant