docs: document usage for Just intrumentation
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I11f818ca94867d483caf89c1753e28876a6a6964
This commit is contained in:
parent
f55edcdedd
commit
aa9c55277c
1 changed files with 49 additions and 18 deletions
|
|
@ -11,19 +11,41 @@ PostgreSQL (production deployments) as available database backends.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
This project uses [Just](https://just.systems/) as its command runner to help
|
||||||
|
run cargo with a consistent interface. You are recommended to get it with Nix,
|
||||||
|
using the default devshell which provides Just.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build all compilable crates
|
# Build everything (core crates + UI)
|
||||||
|
$ just build
|
||||||
|
|
||||||
|
# Build only core crates (cargo)
|
||||||
|
$ just build-core
|
||||||
|
|
||||||
|
# Build only the UI (uses dx - see note below)
|
||||||
|
$ just build-ui
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> The Dioxus UI (`pinakes-ui`) must be built with `dx` (Dioxus CLI) to compile
|
||||||
|
> SCSS stylesheets. Using `cargo build -p pinakes-ui` will not work correctly as
|
||||||
|
> it skips the SCSS compilation step. This was previously "remedied" with an
|
||||||
|
> intermediate build wrapper, which turned out to be fragile. It is highly
|
||||||
|
> recommended that you prefer `just` to build.
|
||||||
|
|
||||||
|
Manual build commands if not using Just:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Core crates (standard cargo)
|
||||||
$ cargo build -p pinakes-core -p pinakes-server -p pinakes-tui
|
$ cargo build -p pinakes-core -p pinakes-server -p pinakes-tui
|
||||||
|
|
||||||
# The Dioxus UI requires GTK3 and libsoup system libraries:
|
# UI (requires Dioxus CLI for SCSS compilation)
|
||||||
|
$ dx build -p pinakes-ui
|
||||||
|
|
||||||
|
# System dependencies for the UI:
|
||||||
# On Debian/Ubuntu: apt install libgtk-3-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev
|
# On Debian/Ubuntu: apt install libgtk-3-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev
|
||||||
# On Fedora: dnf install gtk3-devel libsoup3-devel webkit2gtk4.1-devel
|
# On Fedora: dnf install gtk3-devel libsoup3-devel webkit2gtk4.1-devel
|
||||||
# On Nix: Use the dev shell, everything is provided :)
|
# On Nix: Use the dev shell, everything is provided :)
|
||||||
$ cargo build -p pinakes-ui
|
|
||||||
|
|
||||||
# Alternatively, while app deps are in PATH, you may simply build the entire
|
|
||||||
# workspace.
|
|
||||||
$ cargo build --workspace
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
@ -53,17 +75,20 @@ Key settings:
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
|
All commands are available via Just. Run `just --list` to see all available
|
||||||
|
recipes.
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
|
|
||||||
To use Pinakes, you will need the server to be running. The GUI on its own will
|
To use Pinakes, you will need the server to be running. The GUI on its own will
|
||||||
work, but it will not be functional without the server.
|
work, but it will not be functional without the server.
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
# Start the server first
|
# Using Just
|
||||||
$ cargo run -p pinakes-server -- pinakes.toml
|
$ just run-server
|
||||||
|
|
||||||
# or:
|
# Or manually:
|
||||||
$ cargo run -p pinakes-server -- --config pinakes.toml
|
$ cargo run -p pinakes-server -- pinakes.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
The server starts on the configured host:port (default `127.0.0.1:3000`). In a
|
The server starts on the configured host:port (default `127.0.0.1:3000`). In a
|
||||||
|
|
@ -77,11 +102,11 @@ terminal. While the server is running you may connect to it using the `--server`
|
||||||
flag.
|
flag.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Using defaults
|
# Using Just
|
||||||
$ cargo run -p pinakes-tui
|
$ just run-tui
|
||||||
|
|
||||||
# or with a custom server URL:
|
# Or manually:
|
||||||
$ cargo run -p pinakes-tui -- --server http://localhost:3000
|
$ cargo run -p pinakes-tui
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Keybindings
|
#### Keybindings
|
||||||
|
|
@ -120,9 +145,15 @@ Pinakes features a fully fledged Desktop and Web UI powered by Dioxus. Those two
|
||||||
components are meant as a GUI frontend for the Pinakes server, and are
|
components are meant as a GUI frontend for the Pinakes server, and are
|
||||||
interchangeable in terms of usage.
|
interchangeable in terms of usage.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> The UI must be run with `dx` (Dioxus CLI), not `cargo run`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build the UI
|
# Using Just
|
||||||
$ cargo run -p pinakes-ui
|
$ just run-ui
|
||||||
|
|
||||||
|
# Or manually with dx:
|
||||||
|
$ dx serve -p pinakes-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue