eorst/standalone_docs/install/
mod.rs

1//! # Install
2//!
3//! The recommended way to build and use EORST is via [Nix](https://nixos.org/download.html).
4//! Nix ensures reproducible builds with all dependencies (including GDAL, OpenCV, LightGBM) pre-configured.
5//!
6//! ## Prerequisites
7//!
8//! Install Nix with flake support:
9//!
10//! ```bash
11//! # Install Nix
12//! sh <(curl -L https://nixos.org/nix/install) --daemon
13//!
14//! # Enable flakes (add to ~/.config/nix/nix.conf or ~/.nix-profile/etc/nix/nix.conf)
15//! experimental-features = nix-command flakes
16//! ```
17//!
18//! ## Quick Start
19//!
20//! ### Run CLI tools
21//!
22//! ```bash
23//! # Run eo-rasterize
24//! nix run .#run.eorst
25//!
26//! # Or with options
27//! nix run .#run.eorst -- --help
28//! ```
29//!
30//! ### Development Shell
31//!
32//! ```bash
33//! # Enter development environment with all dependencies
34//! nix develop
35//!
36//! # Then run examples or tests
37//! cargo run --example 3_process_image
38//! cargo test
39//! ```
40//!
41//! ### Build from Source
42//!
43//! ```bash
44//! # Build the library
45//! nix build .#build.eorst
46//!
47//! # Build CLI tools
48//! nix build .#build.eo-rasterize
49//! ```
50//!
51//! ## Available Commands
52//!
53//! | Command | Description |
54//! |---------|-------------|
55//! | `nix run .#run.eorst` | Run the eorst CLI tool |
56//! | `nix run .#run.eo-rasterize` | Run the eo-rasterize CLI tool |
57//! | `nix build .#build.eorst` | Build the library |
58//! | `nix build .#test.eorst` | Run tests |
59//! | `nix build .#clippy.eorst` | Run clippy lints |
60//! | `nix build .#container.eorst` | Build Docker container |
61//! | `nix develop` | Enter development shell |
62//!
63//! ## Troubleshooting
64//!
65//! If using behind a proxy, pass `--impure` to preserve environment variables:
66//!
67//! ```bash
68//! nix run --impure .#run.eorst
69//! ```
70//!
71//! ## Manual Build (Not Recommended)
72//!
73//! If you prefer to build manually, you'll need:
74//! - [Rust](https://rustup.rs/) (latest stable)
75//! - [GDAL](https://gdal.org/) 3.x
76//! - OpenCV (optional, for computer vision features)
77//! - LightGBM (optional, for machine learning features)
78//!
79//! ```bash
80//! cargo build --workspace --all-features
81//! ```
82//!
83//! Note: Manual setup is error-prone due to numerous system dependencies. Nix handles this automatically.