Comments (5)
These perl lines fix some stuff added by default by Emscripten. I already can't remember what it was then.
from argon2-browser.
Hi! What do you mean “load wasm into angular”? You should be able to load and use it as usual, no matter the framework. It mostly depends on bundler setup (webpack, etc...), not on the framework you’re using. Modularize will most likely break it, you’re right.
from argon2-browser.
You're right, I apologize the bad vocabulary. :)
I have tried to compile once again removing -s MODULARIZE
and adding -s ENVIRONMENT='web'
, and manually add the factory function from other js glue code that I have successfully used.
With this setup, the argon2.js
is well formatted, but it contains a XMLHttpRequest that is trying to fetch automatically the wasm from localhost
. I used to fetch manually the wasm file and then instantiating it. I am surely doing something wrong here.
Any help is welcome if you can achieve a build for a modularized version of argon2.js
.
If for you this is not an issue, please feel free to close it and I'll continue to investigate as I do want to use argon2 for the front-end we have to deploy.
Thanks!
from argon2-browser.
I just tried compiling it with:
-s MODULARIZE=1 -s EXPORT_NAME=createMyModule
With these lines disabled,
and then do this:
const wasmBinary = await fetch('dist/argon2.wasm').then(r => r.arrayBuffer());
const Module = await createMyModule({ wasmBinary });
It works for me. What happens for you if you do this?
from argon2-browser.
It works great. 👍
I do apologize I didn't try to understand the perl lines first... Thank you for the update, and once again, a very nice and clean job you've done!
Best
from argon2-browser.
Related Issues (20)
- Pass a salt key? HOT 1
- Example with Snowpack
- cmake build warning on linux HOT 2
- Import is an empty module in Vite HOT 5
- TypeError: arr is not iterable HOT 2
- Module not found: Error: Can't resolve 'fs' in xxx HOT 4
- Fails with Node.js v18.1.0 HOT 3
- How to properly implement WASM in angular HOT 1
- Failed to fetch argon2.wasm
- How to use this?
- Mr browser says this project is blocked by CORS policy HOT 1
- Invalid type name in demo: Argon2di should be Argon2id
- Unable to reproduce argon2.wasm file found on website HOT 5
- Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
- Use with Vite HOT 2
- Build in a nutshell
- Is there a pure JavaScript implementation of Argon2
- `argon2.verify()` documentation in `README.md` is wrong HOT 1
- Is there a way to make it non-blocking? HOT 2
- Memory cost is too small HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argon2-browser.