Module install

Source
Expand description

§Install

The recommended way to build and use EORST is via Nix. Nix ensures reproducible builds with all dependencies (including GDAL, OpenCV, LightGBM) pre-configured.

§Prerequisites

Install Nix with flake support:

# Install Nix
sh <(curl -L https://nixos.org/nix/install) --daemon

# Enable flakes (add to ~/.config/nix/nix.conf or ~/.nix-profile/etc/nix/nix.conf)
experimental-features = nix-command flakes

§Quick Start

§Run CLI tools

# Run eo-rasterize
nix run .#run.eorst

# Or with options
nix run .#run.eorst -- --help

§Development Shell

# Enter development environment with all dependencies
nix develop

# Then run examples or tests
cargo run --example 3_process_image
cargo test

§Build from Source

# Build the library
nix build .#build.eorst

# Build CLI tools
nix build .#build.eo-rasterize

§Available Commands

CommandDescription
nix run .#run.eorstRun the eorst CLI tool
nix run .#run.eo-rasterizeRun the eo-rasterize CLI tool
nix build .#build.eorstBuild the library
nix build .#test.eorstRun tests
nix build .#clippy.eorstRun clippy lints
nix build .#container.eorstBuild Docker container
nix developEnter development shell

§Troubleshooting

If using behind a proxy, pass --impure to preserve environment variables:

nix run --impure .#run.eorst

If you prefer to build manually, you’ll need:

  • Rust (latest stable)
  • GDAL 3.x
  • OpenCV (optional, for computer vision features)
  • LightGBM (optional, for machine learning features)
cargo build --workspace --all-features

Note: Manual setup is error-prone due to numerous system dependencies. Nix handles this automatically.