WebRandomX is a JavaScript/WASM implementation of tevador/RandomX PoW for web platforms.
git clone git@github.com:WebCryptojacking/WebRandomX.git
Prerequisites: emcc, cmake, make
cd WebRandomX
mkdir build && cd build
emcmake cmake -DARCH=native ..
makeTo generate web-randomx-tests and web-randomx-benchmark executables for testing, just set the TESTS option to true and run the generated scripts with Node.js:
emcmake cmake -DARCH=native -DTESTS=true ..
node web-randomx-tests.js
node web-randomx-benchmark.js [options]Prerequisites: npm
npm installFor development, run:
npm run devThen lauch Chrome debugger through VSCode or manually.
For production, run:
npm run buildWebpack will generate the files and put them in the WebRandomX/dist folder. They can be deployed with nginx or Apache.
Note: The proxy server address should be configured in src/js/job.js.