From c2ffee168366196b288f9360c32f522fd5bc3090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 11 Dec 2024 12:49:09 +0100 Subject: [PATCH] :books: Add README to rust project --- render-wasm/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 render-wasm/README.md diff --git a/render-wasm/README.md b/render-wasm/README.md new file mode 100644 index 000000000..c0df8d082 --- /dev/null +++ b/render-wasm/README.md @@ -0,0 +1,25 @@ +# render-wasm + +Canvas-based WebAssembly render engine for Penpot. + +This is a Rust crate that targets [Emscripten](https://emscripten.org/) (`wasm32-unknown-emscripten`). Underneath, it uses Skia via [custom binaries](https://github.com/penpot/skia-binaries/releases/) of the [rust-skia crate](https://github.com/rust-skia/rust-skia). + +## How to build + +With the [Penpot Development Environment](https://help.penpot.app/technical-guide/developer/devenv/) running, create a new tab in the tmux. + +```sh +cd penpot/render-wasm +./build +``` + +The build script will compile the project and copy the `.js` and `.wasm` files to their correct location within the frontend app. + +Edit your local `frontend/resources/public/js/config.js` to add the following flags: + +- `enable-feature-render-wasm` to enable this render engine. +- `enable-render-wasm-dpr` (optional), to enable using the device pixel ratio. + +## Docs + +- [Serialization](./docs/serialization.md)