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

chore: Fix barretenberg noir typescript wrapper #2922

Merged
merged 49 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5ca20f7
Copy from Kobys Branch
kevaundray Sep 29, 2023
e120e24
revert to previous definition
kevaundray Sep 29, 2023
15ebc21
remove unused ignore file
kevaundray Sep 29, 2023
29d7f94
revert: group tooling workspace packages
kevaundray Sep 29, 2023
190f011
format
kevaundray Sep 29, 2023
c053aac
update yarn.lock
kevaundray Sep 29, 2023
9dcbbca
Import types into noir_js
kevaundray Sep 29, 2023
bbcf611
replace anonymous object with CompiledCircuit type
kevaundray Sep 29, 2023
7959844
export Noir
kevaundray Sep 29, 2023
ebaa551
lint fix
kevaundray Sep 29, 2023
894162d
update lockfile
kevaundray Sep 29, 2023
ef6ad1c
remove prettier
kevaundray Sep 29, 2023
01aee47
lint fix
kevaundray Sep 29, 2023
17b8956
copy barretenberg backend from ts
kevaundray Sep 29, 2023
e84e060
remove prettier
kevaundray Sep 29, 2023
1372c0d
remove compiled_examples from gitignore
kevaundray Sep 29, 2023
f4f0a79
remove lib folder
kevaundray Sep 29, 2023
0368617
add redundant methods
kevaundray Sep 29, 2023
9312121
extend mv syntax so that we convert all files to cjs in cjs folder
kevaundray Sep 29, 2023
8468b07
import backend
kevaundray Sep 29, 2023
8672a11
delete backend file
kevaundray Sep 29, 2023
7c72e68
add bb backend to workspace
kevaundray Sep 29, 2023
ab0c694
update index.ts in bb backend interface file
kevaundray Sep 29, 2023
331f157
update yarn.lock
kevaundray Sep 29, 2023
4f9a363
Merge remote-tracking branch 'origin/master' into kw/add-bb-backend-i…
kevaundray Sep 29, 2023
a0e327c
lint --fix
kevaundray Sep 29, 2023
5be1151
build bb.js wrapper
kevaundray Sep 29, 2023
26eeabf
Update tooling/noir_js_backend_barretenberg/src/serialize.ts
kevaundray Sep 29, 2023
3710d73
silence error if lib does not exist
kevaundray Sep 29, 2023
d8ddde0
chore: add gitignore
TomAFrench Sep 29, 2023
69b47e2
Merge remote-tracking branch 'origin/master' into kw/add-bb-backend-i…
kevaundray Oct 1, 2023
c2d850b
add init method to noir class
kevaundray Oct 1, 2023
d424a0a
compile types package
kevaundray Oct 1, 2023
93818e0
run `yarn`
kevaundray Oct 1, 2023
1724133
if moduleResolution is NodeNext, then set module to NodeNext
kevaundray Oct 1, 2023
679cad6
fix: when calling from noir-starter, I was getting cannot find "seria…
kevaundray Oct 1, 2023
b31185a
add noir_js_types build to noir_js ci build
kevaundray Oct 1, 2023
48a1a67
Merge branch 'kw/compile-noir-types-package' into kw/use-pkg-json-for…
kevaundray Oct 1, 2023
90d14d4
chmod +x fixup.sh
kevaundray Oct 1, 2023
619029e
chore: compile types package (#2921)
kevaundray Oct 2, 2023
59751cb
Update tooling/noir_js/src/program.ts
TomAFrench Oct 2, 2023
c662120
Update tooling/noir_js_backend_barretenberg/src/serialize.ts
TomAFrench Oct 2, 2023
55aadff
Merge branch 'master' into kw/add-init-to-noir
TomAFrench Oct 2, 2023
3b62219
fix merge resolution: extra build step
kevaundray Oct 2, 2023
4606b26
Merge remote-tracking branch 'origin/master' into kw/use-pkg-json-for…
kevaundray Oct 2, 2023
e1dbc37
Merge branch 'kw/add-init-to-noir' into kw/use-pkg-json-for-bb-wrapper
TomAFrench Oct 2, 2023
b0209f9
Merge branch 'master' into kw/use-pkg-json-for-bb-wrapper
TomAFrench Oct 2, 2023
e67d966
chmod +x fixup.sh
kevaundray Oct 2, 2023
1bcf06b
remove extra chmod +x
kevaundray Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tooling/noir_js_backend_barretenberg/fixup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Put these package.json files in the cjs and
# mjs directory respectively, so that
# tools can recognise that the .js files are either
# commonjs or ESM files.
cat >lib/cjs/package.json <<!EOF
{
"type": "commonjs"
}
!EOF

cat >lib/esm/package.json <<!EOF
{
"type": "module"
}
!EOF
12 changes: 6 additions & 6 deletions tooling/noir_js_backend_barretenberg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"license": "(MIT OR Apache-2.0)",
"type": "module",
"source": "src/index.ts",
"main": "lib/cjs/index.cjs",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"exports": {
"require": "./lib/cjs/index.cjs",
"default": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts"
"require": "./lib/cjs/index.js",
"types": "./lib/esm/index.d.ts",
"default": "./lib/esm/index.js"
},
"types": "lib/esm/index.d.ts",
"scripts": {
"dev": "tsc --watch",
"build": "yarn clean && tsc && tsc -p ./tsconfig.cjs.json && mv ./lib/cjs/index.js ./lib/cjs/index.cjs && mv ./lib/cjs/serialize.js ./lib/cjs/serialize.cjs && mv ./lib/cjs/base64_decode.js ./lib/cjs/base64_decode.cjs",
"build": "yarn clean && tsc && tsc -p ./tsconfig.cjs.json && ./fixup.sh",
"clean": "rm -rf ./lib",
"prettier": "prettier 'src/**/*.ts'",
"prettier:fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
Expand All @@ -40,4 +40,4 @@
"prettier": "3.0.3",
"typescript": "5.1.5"
}
}
}
2 changes: 1 addition & 1 deletion tooling/noir_js_backend_barretenberg/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "esnext",
"declaration": true,
"emitDeclarationOnly": false,
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "./lib/esm",
"esModuleInterop": true,
Expand Down
Loading