See a very early example in action at
https://seahorse-app-r8jlv.ondigitalocean.app/
Contributors welcome! Get in touch or check out the good first issues.
- node v19.7.0 (Best to install via
nvm
) - wasm-pack (installed globally with
npm install -g wasm-pack
) - yarn
- Install packages with
yarn
. This should also automatically set up husky and install cargo watch and wasm-pack globally. - Run the development environment with
yarn run dev
. This runsyarn run dev:wasm
andyarn run dev:js
simultaneously and watches for changes to both.
Run all tests with yarn run test
. This calls both yarn run test:wasm
and yarn run test:cypress
. We may add unit tests to the TypeScript at a later date.
It is important to benchmark some functions to make sure we can render updates at 60fps. To make this happen each api call that updates the canvas must take < 16ms.
To run benchmarks run yarn run bench
Deployments are triggered whenever a pull request to the 'prod' branch is merged.
You can test the Dockerfile with docker build .
. The test site lives is hosted in a digital ocean app under the following config
name: orca-app
region: lon
services:
- dockerfile_path: Dockerfile
github:
branch: main
deploy_on_push: true
repo: hectorbennett/rust-wasm-react-base
http_port: 3000
instance_count: 1
instance_size_slug: basic-xxs
name: rust-wasm-react-base
routes:
- path: /
source_dir: /