-
Notifications
You must be signed in to change notification settings - Fork 271
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
feat: compile noir contracts with noir_wasm #2737
Merged
Merged
Changes from 20 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
1035a8a
perf: avoid second yarn install
alexghr 6dcff34
feat: add noir_wasm
alexghr 9fe0024
refactor: remove nargo
alexghr 50176b6
refactor: alternative way to patch ts-jest
alexghr ec6024c
fix: include yarn patches in yarn-project-base
alexghr 007abef
fix: common package.json
alexghr d9c2810
ci: add noir-compiler-build to cci config
alexghr 6466bb3
chore: update noir_wasm
alexghr 6d0fba2
refactor: remove noir-contracts-build image
alexghr 45e243b
fix: yarn-project docker image
alexghr ad8df0e
chore: purge noir-version.json
alexghr 1d481e5
Merge branch 'master' into alexg/feat/noir-wasm
alexghr d299290
chore: lint
alexghr 71c1bf3
chore: update acvm
alexghr 1b328b2
fix: resolve project path before compiling
alexghr 82c01e2
fix: throw an error if can't compile
alexghr ec25afb
test: update expected error messages
alexghr bea08d0
chore: restore nargo
alexghr f3fea51
chore: fix nargo snapshot tests in CI
alexghr e43465b
fix: specify correct type for compiler flag
alexghr 89ea930
Update yarn-project/noir-compiler/src/compile/noir/dependencies/githu…
alexghr eb8c172
Update yarn-project/noir-compiler/src/compile/noir/dependencies/githu…
alexghr bdbb0af
Update yarn-project/noir-compiler/src/compile/noir/noir-wasm-compiler.ts
alexghr 8317f5f
fix: address code review
alexghr f8c7c7d
fix: add zod to parse Nargo.toml
alexghr fed8f58
refactor: only look at src directory
alexghr 66283b4
fix: safely generate a filename from a git url
alexghr bf4244d
fix: add comment to ts-jest patch
alexghr 62975d3
refactor: use memfs
alexghr 54a002e
fix: write deps to tmp files and atomically move
alexghr f957f14
fix: code review
alexghr f34ddf1
fix: binary is latin1
alexghr 334d51f
fix: tmp directory when extracting
alexghr df88d72
Merge remote-tracking branch 'origin/master' into alexg/feat/noir-wasm
alexghr 85d15c4
chore: update package.json
alexghr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
yarn-project/.yarn/patches/ts-jest-npm-29.1.1-04e888e48e.patch
alexghr marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/dist/constants.js b/dist/constants.js | ||
index 15a900a5ea36e38e7344d5713cdffa1edbdd539d..879c59892b4bd13470146d82a17691dd8ac0d25b 100644 | ||
--- a/dist/constants.js | ||
+++ b/dist/constants.js | ||
@@ -4,8 +4,8 @@ exports.DEFAULT_JEST_TEST_MATCH = exports.JS_EXT_TO_TREAT_AS_ESM = exports.TS_EX | ||
exports.LINE_FEED = '\n'; | ||
exports.DECLARATION_TYPE_EXT = '.d.ts'; | ||
exports.JS_JSX_EXTENSIONS = ['.js', '.jsx']; | ||
-exports.TS_TSX_REGEX = /\.m?tsx?$/; | ||
-exports.JS_JSX_REGEX = /\.m?jsx?$/; | ||
+exports.TS_TSX_REGEX = /\.[cm]?tsx?$/; | ||
+exports.JS_JSX_REGEX = /\.[cm]?jsx?$/; | ||
// `extensionsToTreatAsEsm` will throw error with `.mjs` | ||
exports.TS_EXT_TO_TREAT_AS_ESM = ['.ts', '.tsx', '.mts']; | ||
exports.JS_EXT_TO_TREAT_AS_ESM = ['.jsx']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why was this needed? Not something that can be fixed via jest config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noir-lang/source-resolver
uses global scope to keep a function to read file contents with. This is used by@noir-lang/noir_wasm
. The wasm compiler loads it as CJS so we have to load it as CJS also. I used.cts
file to do this and the jest plugin we use to compile TS at runtime doesn't support.cts
files yet kulshekhar/ts-jest#3996