mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
add some developer documentation
This commit is contained in:
parent
3398027ad2
commit
d973bca0b3
4 changed files with 86 additions and 1 deletions
80
DEVELOPING.md
Normal file
80
DEVELOPING.md
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# Developing
|
||||
|
||||
## Setup
|
||||
|
||||
### Nix based development environment
|
||||
|
||||
The recommended way to setup the development environment is to use
|
||||
[Lix](https://lix.systems/install/)/[Nix](https://nixos.org/download/).
|
||||
|
||||
Once installed, you can enter the development shell using `nix develop` or,
|
||||
setup [direnv](https://direnv.net/) to automatically enter the development shell
|
||||
when you enter the folder.
|
||||
|
||||
The development shell provides all necessary tooling to develop haze.
|
||||
|
||||
### Without Nix
|
||||
|
||||
The fooling tools need to be setup to develop without using Nix to manage the
|
||||
development setup:
|
||||
|
||||
- [`cargo`](https://doc.rust-lang.org/cargo/getting-started/installation.html) -
|
||||
For building the program
|
||||
- [`mdbook`](https://github.com/rust-lang/mdBook) - For building the
|
||||
documentation
|
||||
- [`prettier`](https://prettier.io/) - For formatting the non-rust files
|
||||
- [`vale`](https://vale.sh/) - For checking documentation
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
cargo build
|
||||
```
|
||||
|
||||
The binary can then be found at `target/debug/haze`.
|
||||
|
||||
## Formatting
|
||||
|
||||
### With Nix
|
||||
|
||||
```bash
|
||||
nix fmt
|
||||
```
|
||||
|
||||
### Without Nix
|
||||
|
||||
#### Rust code
|
||||
|
||||
```bash
|
||||
cargo fmt
|
||||
```
|
||||
|
||||
#### Documentation
|
||||
|
||||
```bash
|
||||
prettier --write '**/*.md'
|
||||
```
|
||||
|
||||
### Building documentation
|
||||
|
||||
```bash
|
||||
mdbook serve
|
||||
```
|
||||
|
||||
### Checking documentation
|
||||
|
||||
```bash
|
||||
vale src/ book/src/ book/README.md *.md
|
||||
```
|
||||
|
||||
### Run all checks
|
||||
|
||||
```bash
|
||||
nix flake check
|
||||
```
|
||||
|
||||
### Building docker images
|
||||
|
||||
```bash
|
||||
nix run .#'"haze-image-php-8.4"'.copyToDockerDaemon
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue