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

I can't seem to use this package when bundling my code for AWS lambda. #40

Open
ivands opened this issue Jul 26, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ivands
Copy link

ivands commented Jul 26, 2024

Right now, I'm bundling my code to make it ready for AWS Lambda.
But because of how the WASM is loaded, the bundler can't know about the WASM files.
Would it be possible to import the WASM file with a regular import statement?

Example:

import { decode } from "file.wasm"

This would allow bundlers to recognize what is happening and include the wasm file in the bundle output.
Of course, node / deno will need native support for wasm imports. 🤞

@ivands ivands added the bug Something isn't working label Jul 26, 2024
@matmen
Copy link
Owner

matmen commented Jul 28, 2024

The browser branch might work for you, though it uses fetch() calls to import the WASM instead of using a local binary. I'm not sure the npm version would work on AWS Lambda - even if bundled accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants