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

Generate WASM/JS Fallback during build process #6868

Merged
merged 4 commits into from
May 22, 2024
Merged

Conversation

murilopereirame
Copy link
Contributor

@murilopereirame murilopereirame commented Apr 18, 2024

Generates WASM artifact and it's fallback during the build without the need of check in the WASM files.

Closes #6835

@murilopereirame murilopereirame force-pushed the wasm-loader-6835 branch 11 times, most recently from 18f4d1c to af69158 Compare April 23, 2024 15:20
@murilopereirame murilopereirame marked this pull request as ready for review April 24, 2024 08:28
@murilopereirame murilopereirame changed the title Generate WASM/JS Fallback on esbuild Generate WASM/JS Fallback during build process Apr 24, 2024
@murilopereirame murilopereirame force-pushed the wasm-loader-6835 branch 5 times, most recently from b4d3023 to fa91cea Compare April 29, 2024 10:28
.github/workflows/test.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
packages/tuta-wasm-loader/lib/WasmHandler.ts Show resolved Hide resolved
packages/tuta-wasm-loader/lib/index.ts Outdated Show resolved Hide resolved
packages/tuta-wasm-loader/lib/index.ts Outdated Show resolved Hide resolved
packages/tutanota-crypto/test/KyberTest.ts Show resolved Hide resolved
types/globals.d.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@charlag charlag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks! let's squash it before merging tho

murilopereirame and others added 3 commits May 13, 2024 14:05
This commit adds the generation of a JavaScript transpile for the Liboqs
and Argon2 WebAssembly files. This is done through wasm2js that's
builtin on emcc.

WASM/JS fallbacks use the same interface and reduce the extra type
casting once initialized.

Co-authored-by: wec43 <wec@tutao.de>
Co-authored-by: paw <paw-hub@users.noreply.github.com>
This commit adds the generation of WASM files and their respective
fallback to the build process.
Adapt the tests to work with the new format of loading the fallback and
the wasm files. This commit also fixes the ESBuild function to correctly
resolve the fallback and generate it.

Remove the hardcoded make command and add the option to use a provided
command instead of make. Also adds the possibility to provide env vars
and a working dir for Wasm generation.
@murilopereirame
Copy link
Contributor Author

Looks good now, thanks! let's squash it before merging tho

Squashed and rebased

@wrdhub wrdhub added this pull request to the merge queue May 22, 2024
Merged via the queue into master with commit 2734a79 May 22, 2024
1 check passed
@wrdhub wrdhub deleted the wasm-loader-6835 branch May 22, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use build plugins to generate wasm glue & fallback
3 participants