Skip to content

Commit

Permalink
Make C API build instructions usable
Browse files Browse the repository at this point in the history
The Rust toolchain is not installed globally by default, so it is impossible to use
Cargo to install a library unless installing another toolchain for root, messing with
the root environment so the whole user toolchain can be located, or installing locally
and then manually moving the output. This fixes the installation instructions to use
the simplest of those solutions.
  • Loading branch information
rzumer authored Feb 25, 2021
1 parent 98e1872 commit 3d9b691
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ The resulting binary will not work on cpus that do not sport the same set of SIM

> **NOTE** : You may use `rustc --print target-cpus` to check if the cpu is supported, if not `-C target-cpu=native` would be a no-op.
### Building the C-API
### Building the C API
**rav1e** provides a C-compatible set of library, header and pkg-config file.

To build and install it you can use [cargo-c](https://crates.io/crates/cargo-c):

```sh
cargo install cargo-c
cargo cinstall --release
$ cargo install cargo-c
$ cargo cinstall --destdir=$HOME/librav1e --release
# mv $HOME/librav1e/* / && rmdir $HOME/librav1e
```

## Usage
Expand Down

0 comments on commit 3d9b691

Please sign in to comment.