* Add dev command for building wasm backend This aims to reduce the time spent building when testing with the wasm backend. On my machine `yarn release` takes 20s while `yarn dev` takes just 2s. * Separate out building wasm  | 
			||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| test | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||
| GOALS_AND_ISSUES.md | ||
| LICENSE | ||
| package.json | ||
| package.mjs.json | ||
| package.pkg.json | ||
| README.md | ||
| yarn.lock | ||
automerge-backend-wasm
This is a wrapper for the rust implementation of automerge-backend to be used with Automerge.
Using
You can require this synchronously as a CommonJS module or import it as a ES6 module
let Automerge = require("automerge")
let Backend = require("automerge-backend-wasm")
Automerge.setDefaultBackend(Backend)
import * as Automerge from "automerge"
import * as Backend from "automerge-backend-wasm"
Automerge.setDefaultBackend(Backend)
Note that the first uses a synchronous filesystem load of the wasm and will not be transferable to a browser bundle. The second uses ES6 wasm import statements which should work in all modern browsers but require a '--experimental-wasm-modules' flag on nodejs (v13 on) unless you pack/bundle the code into compatible format.