Environment
Development of OctoType is pretty simple, and shouldn't require any obscure dependencies. All tools used by me are listed in the Tools section.
Nix Devshell
If you use nix, a devshell is provided for development within the flake.nix of
the repository. It can be started with (Reuires flakes enabled):
nix develop . --command "<your shell here>"
The devshell supplies all dependencies needed to develop on OctoType, with the addition of a few tools that i prefer.
just
just is command runner (Like make).
just is used to ensure that scripts are streamlined throughout the development
of octotype.
The easiest way to install just is through Cargo:
cargo install just
If you don't already have Cargo installed, check the Codebase Development section for instructions.
You can see how to install just here.
On Windows just requires you to have sh installed by default. You should
be able to overwrite this overwrite this by setting
set shell := ["powershell.exe", "-c"] or set shell := ["cmd.exe", "/c"]
in your
user justfile,
if you prefer not installing sh
To get started using just, you can list the available commands by simply executing:
just
Or, you can take a look in the justfile in the root of the repository.
Codebase development
All you need for developing on the codebase is the rust "suite" of tools (Cargo,
rustup, etc.) and cargo-nextest.
The rust tools can be installed here.
And after that, you can install cargo-nextest via. Cargo:
cargo install cargo-nextest --locked
You can then use the just scripts to run, build or test the binary.
Documentation development
Editing the documentation doesn't need any tools, but they can come in handy for previewing and testing compilation of the page.
If you want to be able to serve the development site of the docs, you need NodeJS.
Once installed you can go into the docs folder in the repository and install
the node dependencies by running:
npm install
Then, to start the development server you need to run:
npm start # Runs a development preview server with hot-reloading
Other great tools
| Tool | Description | Installation |
|---|---|---|
bacon | A background code checker for rust | cargo install bacon |
cargo-expand | Expand rust macros to see what code they generate | cargo install cargo-expand |