cellular-automaton 0.1.6

A cellular automaton simulation library targeting WebAssembly.
Documentation

Rust Library

# Cargo.toml
[dependencies]
cellular-automaton = "0.1"

This crate defaults to supporting WebAssembly. To build the crate without WebAssembly support, don't use the crate's default features:

cargo build --no-default-features

JavaScript Package

# npm
npm i @tedbyron/cellular-automaton

# yarn
yarn add @tedbyron/cellular-automaton

# pnpm
pnpm add @tedbyron/cellular-automaton

The npm package has:

  • A ~60kb WASM binary
  • No dependencies
  • JavaScript bindings to the WASM binary
  • TypeScript definitions

The package is built to target webpack (--target bundler) but can be rebuilt from the Rust library for a different target:

wasm-pack build --target <bundler|nodejs|web|no-modules>
wasm-opt -Os pkg/cellular_automaton_bg.wasm -o pkg/cellular_automaton_bg.wasm