Skip to content

Commit 20cc644

Browse files
committed
Make C API installation instructions usable
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.
1 parent 98e1872 commit 20cc644

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,15 @@ The resulting binary will not work on cpus that do not sport the same set of SIM
127127

128128
> **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.
129129
130-
### Building the C-API
130+
### Building the C API
131131
**rav1e** provides a C-compatible set of library, header and pkg-config file.
132132

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

135135
```sh
136-
cargo install cargo-c
137-
cargo cinstall --release
136+
$ cargo install cargo-c
137+
$ cargo cinstall --destdir=$HOME/librav1e --release
138+
# mv $HOME/librav1e/* / && rmdir $HOME/librav1e
138139
```
139140

140141
## Usage

0 commit comments

Comments
 (0)