Rust implementation of a toy neural net library
Learn more about cargo generate
here.
cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
cd my-project
wasm-pack build --target web
// <script type="module">
import init, { NeuralNet } from 'path/to/this/pkg/neural_net_rs.js';
init().then(() => {
const nn = new NeuralNet(/* ... */);
// ...
});
wasm-bindgen
for communicating between WebAssembly and JavaScript.console_error_panic_hook
for logging panic messages to the developer console.