Home Explore Blog CI



ragit

1st chunk of `docs/build.md`
c6157e0ab7e4dac5bfb3f05bc06546db79bd010c66c0e1f90000000100000607
# 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)

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.