-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Better bundling for bb.js, remove aztec.js bundling (#11761)
Improves `bb.js` bundling by providing lazily loaded gzipped wasm artifacts that get included with the library as plain old .js files via inlining. This combines the previous "inline all the things in a big file" approach (with its convenience advantage) with the new lazy loading approach that reduces load time and bundle sizes. This has rendered bundling `aztec.js` unnecessary. Also the bundle wasn't used downstream due to the output `main.js` file not being exposed anywhere. It should allow external bundlers to tree-shake efficiently and streamline our build process. Started aztec.js refactor to try and prune some of the l1 stuff --------- Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
- Loading branch information
Showing
60 changed files
with
502 additions
and
739 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/barretenberg-threads.ts
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,3 @@ | ||
import barretenbergThreadsModule from '../../barretenberg-threads.wasm.gz'; | ||
|
||
export default barretenbergThreadsModule; |
3 changes: 3 additions & 0 deletions
3
barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/barretenberg.ts
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,3 @@ | ||
import barretenbergModule from '../../barretenberg.wasm.gz'; | ||
|
||
export default barretenbergModule; |
8 changes: 4 additions & 4 deletions
8
barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/index.ts
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
File renamed without changes.
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.