-
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
Changes from 17 commits
1035a8a
6dcff34
9fe0024
50176b6
ec6024c
007abef
d9c2810
6466bb3
6d0fba2
45e243b
ad8df0e
1d481e5
d299290
71c1bf3
1b328b2
82c01e2
ec25afb
bea08d0
f3fea51
e43465b
89ea930
eb8c172
bdbb0af
8317f5f
f8c7c7d
fed8f58
66283b4
bf4244d
62975d3
54a002e
f957f14
f34ddf1
334d51f
df88d72
85d15c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
alexghr marked this conversation as resolved.
Show resolved
Hide resolved
|
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']; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,21 +1,17 @@ | ||||||||||||||||||||||
# This base dockerfile adds all the remaining source files, performs artifact generation, and builds the project. | ||||||||||||||||||||||
# See yarn-project-base/Dockerfile for deeper insight into why things are how they are. | ||||||||||||||||||||||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-contracts-build as noir | ||||||||||||||||||||||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base as builder | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Copy in the entire workspace. | ||||||||||||||||||||||
COPY . . | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Generate Noir contract TypeScript artifacts. | ||||||||||||||||||||||
COPY --from=noir /usr/src/yarn-project/noir-contracts/target /usr/src/yarn-project/noir-contracts/target | ||||||||||||||||||||||
# Run yarn build to have the json artifacts available for the types generator, generate types, build again. | ||||||||||||||||||||||
RUN apk add perl | ||||||||||||||||||||||
RUN cd /usr/src/yarn-project/noir-contracts && yarn build && ./scripts/types_all.sh && yarn build | ||||||||||||||||||||||
# Cleanup to reduce final image size. | ||||||||||||||||||||||
RUN rm -rf noir-contracts/target | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Build the entire project. | ||||||||||||||||||||||
RUN yarn tsc -b | ||||||||||||||||||||||
# Build the project. | ||||||||||||||||||||||
# bash & perl are needed for noir-contracts | ||||||||||||||||||||||
RUN apk add bash perl &&\ | ||||||||||||||||||||||
yarn workspace @aztec/foundation build && \ | ||||||||||||||||||||||
yarn workspace @aztec/noir-compiler build && \ | ||||||||||||||||||||||
yarn workspace @aztec/noir-contracts noir:build:all && \ | ||||||||||||||||||||||
yarn tsc -b | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think better to split this into 3 `RUN steps for more efficient caching
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
# Build aztec.js web artifact | ||||||||||||||||||||||
RUN cd /usr/src/yarn-project/aztec.js && yarn build:web | ||||||||||||||||||||||
|
@@ -37,4 +33,4 @@ RUN cp /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/yarn-p | |||||||||||||||||||||
|
||||||||||||||||||||||
WORKDIR /usr/src/yarn-project | ||||||||||||||||||||||
|
||||||||||||||||||||||
ENTRYPOINT ["yarn"] | ||||||||||||||||||||||
ENTRYPOINT ["yarn"] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
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.
Does this use deployed NPM packages? Because on github / locally all package.json files are hardcoded to 0.1.0 version, which we then update in CI when releasing
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.
yeah, this was using the version we got from npm. We only need
@noir-lang/noir_wasm
's version number