Skip to main content

Setting up a development environment

1

Clone the repository

git clone https://github.com/FRKFFR/prismic-avatar-search-app
cd prismic-avatar-search-app
2

Build the project

Run a development build to verify that your toolchain is set up correctly and all dependencies compile:
cargo build
Cargo downloads and compiles all dependencies automatically on the first build.
3

Run the application

cargo run
The app starts and guides you through the database download and login steps if you haven’t completed them yet.
4

Run the test suite

cargo test
The cache/ directory and config.json are auto-created at runtime and are not committed to git. Do not add them to version control.

Code quality tools

Run these commands before submitting a pull request:
cargo fmt                 # format code
cargo fmt --check         # check formatting without making changes
cargo clippy -- -D warnings  # lint and treat warnings as errors
cargo test                # run tests

Code style guidelines

  • Follow Rust idioms and best practices. Prefer iterators, ? for error propagation, and pattern matching over manual checks.
  • Use cargo fmt. Formatting is required. The CI check will fail if cargo fmt --check reports any differences.
  • Use cargo clippy. All clippy warnings must be resolved before merging. Run with -D warnings to catch everything.
  • Document public functions. Add doc comments (///) to any pub function or type. Include a brief description and, where non-obvious, an example.

Project structure

prismic_avatar_search/
├── src/
│   ├── main.rs                    # Application entry point, UnifiedAvatarManager
│   ├── database_downloader_gui.rs # Database download & processing module
│   ├── login_gui.rs               # VRChat authentication module
│   └── avatar_browser_gui.rs      # Avatar browsing & search UI
├── Cargo.toml                     # Project dependencies and metadata
├── cache/                         # Downloaded databases (auto-created, gitignored)
└── config.json                    # Auth settings (auto-created, gitignored)
Each of the three src/ modules is self-contained: it owns its UI state, its worker thread, and its channel communication. main.rs owns the top-level UnifiedAvatarManager struct, which holds the active module as an AppState enum variant and dispatches eframe::App::update() calls to it.

Build docs developers (and LLMs) love