Page:
Refactor local development flow
No results
1
Refactor local development flow
javif89 edited this page 2026-06-22 21:45:25 +00:00
Local Development Setup
Prerequisites
- Nix with flakes enabled
- direnv
Getting Started
- Enter the shell for the project and to
direnv allow - Run
just reset-dbto create & set up the sqlite database at the project root. - Run
just install-iconsto get the devicons set up in the right directory (you only have to do this once) - (Optional) Create a local
waycast.tomlin./xdg/.config/waycast.toml
Running the project
I suggest just run instead of cargo run. cargo run will work, but
iced (the UI library), runs very slow in dev builds, so I opted to just run a release
build instead. That's what the just run recipe does.
Daemon & UI
The first just run will start the daemon. If you then open a new shell and do just run again, it will send a signal to the daemon to show the UI.
Database
You can use any DB viewer (like datagrip) to inspect the waycast.db sqlite file.
Additional notes
When running from the project directory, waycast detects dev mode by checking for
Cargo.toml in the current directory. In dev mode:
cache_dir()points to./xdg/.cacheinstead of~/.cache/waycastdata_dir()points to./xdg/.local/shareinstead of~/.local/share/waycast- Config still reads from the real XDG config path (
~/.config/waycast/)
Note: The database path is currently hardcoded to "waycast.db" (relative), so it
always uses the file at the workspace root regardless of dev mode. This is a known issue.