Comments (4)
What’s your emsctipten and binaryen versions?
Could you please upload the build log somewhere?
from argon2-browser.
Emscripten 1.38.8. I think binaryen has the same version nr? Not sure how to find out. It's whatever came with the emscripten 1.38.8 install, which was latest as of yesterday.
Build log is just this.
from argon2-browser.
Building with -s ASSERTIONS=1
as suggested by the console output actually gave useful information!
uncaught exception: abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
That was clearly actionable. Fixing that brought up a few similar errors. I ended up adding the following to the following into to the build scripts' linker flags:
-s 'EXTRA_EXPORTED_RUNTIME_METHODS=[\"intArrayFromString\",\"ALLOC_NORMAL\",\"allocate\"]'
At this point, testing using /docs/index.html
, the WebAssembly version asked for Pointer_stringify
to also be exported. Adding that into the above in build-wasm.sh
resolved this, and makes it run fine! So that's one down at least.
The asm.js version, on the other hand, started complaining that Assertion failed: you need to wait for the runtime to be ready (e.g. wait for main() to be called)
. This is probably caused by the .wasm
file request failing, as shown in the browser console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///Users/fang/softsrc/argon2-browser/docs/argon2-asm.min.wasm. (Reason: CORS request not http).
But then I'm unsure what this is still doing different from the version supplied with the repo, which doesn't have any issue requesting the .wasm
file. (Yes, I'm just loading the .html
file into my browser directly rather than going through a localhost server, in all cases described here.)
I'm assuming this project still builds/runs fine as-is for you, with latest emscripten and emscripten cmake toolchain file?
Maybe there's a system discrepancy at play here. I'm on MacOS 10.12.6.
Would you consider accepting the above -s
addition into the build scripts, assuming that doesn't magically break the build on your end?
Thanks again for your time, hopefully we can work together to make builds for this project more consistent across whatever variable it is we're hitting here. (:
from argon2-browser.
I'll close this, not sure what I can I do with it. Probably playing with different versions of compliers will eventually give a working result.
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 1
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.