Graphite is built with Rust and web technologies. Install the latest LTS version of Node.js and stable release of Rust, as well as Git.
Installing
Clone the project:
On Debian-based (Ubuntu, Mint, etc.) Linux distributions, you may need to install the following packages:
On Fedora-based (RHEL, CentOS, etc.) Linux distributions, you may need to install the following packages:
Then install the required Node.js packages:
You only need to explicitly install Node.js dependencies. Rust's cargo dependencies will be installed automatically on your first build. One dependency in the build chain, wasm-pack
, will be installed automatically on your system when the Node.js packages are installing. (If you prefer to install this manually, get it from the wasm-pack website, then install your npm dependencies with npm install --omit=optional
instead.)
One tool in the Rust ecosystem does need to be installed:
That's it! Now, to run the project while developing, just execute:
This spins up the dev server at http://localhost:8080 with a file watcher that performs hot reloading of the web page. You should be able to start the server, edit and save web and Rust code, and rarely have to kill the server (by hitting CtrlC twice). You sometimes may need to reload the browser's web page if the hot reloading didn't behave perfectly. This method compiles Graphite code in debug mode which includes debug symbols for viewing function names in stack traces. But be aware, it runs slower and takes more memory.
Production builds
You'll rarely ever need to do this, but to compile a production build with full optimizations:
This produces the /frontend/dist
directory containing the static site files that must be served by your own web server.