Home Explore Blog CI



ragit

docs/build.md
b2a123f3d409033c854e16bdcfc2d3d53c0aaf8d35d918030000000300000607
# Build

## cargo

If you have [cargo](https://github.com/rust-lang/cargo) installed, just run `cargo install ragit`.

## install from source

### Dependencies

- ubuntu: `sudo apt install clang libssl-dev libfontconfig1-dev make unzip`
- redhat: `sudo dnf install clang openssl-devel fontconfig-devel unzip`

These are dependencies needed when all the features are enabled. By default, most features are disabled and you don't need all of them.

### Compile

```
git clone https://github.com/baehyunsol/ragit
```

```
cd ragit
```

You need [cargo](https://github.com/rust-lang/cargo) anyway to compile the source. `cargo` is the only dependency. Make sure that your rust-toolchain is up to date. Ragit doesn't have an MSRV policy. It's always tested on the newest version of rust and is likely to fail on 1.84 or older versions.

```
# only default features
cargo build --release

# enable all features
cargo build --release --features=full
```

### Building mupdf-rs

If you enable `pdf` feature, it depends on [mupdf-rs](https://github.com/messense/mupdf-rs).

On apple silicon, you have to add below lines to `Cargo.toml`. It's already added to ragit. If you want to use ragit as library, you have to add it manually.

```toml
[patch.crates-io]
pathfinder_simd = { git = "https://github.com/servo/pathfinder.git" }
```

## Test scripts

If you have Python, test your build with test scripts.

```
python scripts/tests.py all
```

## Download pre-built binary

Check out [github release page](https://github.com/baehyunsol/ragit/releases)

Chunks
c6157e0a (1st chunk of `docs/build.md`)
Title: Building and Installing Ragit
Summary
Instructions on how to build and install Ragit using cargo, from source, or by downloading a pre-built binary, including information on dependencies, compilation, testing, and troubleshooting for various operating systems, such as Ubuntu and Redhat, with specific commands and configurations for successful installation.