Park-Miller-Carta PRNG [WIP]
(documentation in progress) This is a multi-language repository, demonstrating C-Rust-Node.js-Web interoperability.
It utilizes Rust as a build system, in order to compile the original C implemetations by Robin Whittle. A faithful Rust port is also included, cross-compilable to asm.js and WebAssembly via Emscripten, for use in Node.js and browsers.
Getting Started
- Clone the repository:
git clone https://github.com/kenOfYugen/rust_node_wasm
- Enter the directory:
cd rust_node_wasm
- Build (add the
--release
flag for optimized builds)
- Rust-C static/dynamic libraries:
cargo b
- asm.js library:
cargo b --target asmjs-unknown-emscripten
- wasm library:
cargo b --target wasm32-unknown-emscripter
- Node.js:
npm run build:all