To run models in JavaScript we use support from two JavaScript packages:
Run ./scripts/update_js
to update these packages automatically to the most recent version (currently this uses the most recent version merged to main, but later we may switch to the most recent version published to npm once we settle on a workflow there).
The other js code here is handwritten and only used in tests:
dust-rng.js
provides an interface to R's random number generator (requires running via the V8 package with a host copy of R)test-continuous.js
and test-discrete.js
provide wrappers for running the wodin interface from R's testsAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.