Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make C API installation instructions usable #2677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo might be mentioned.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using mv like this won't yield correct permissions unfortunately.

We could just suggest an install into ~/.local

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical way to copy with correct permissions is /usr/bin/install, but it unfortunately can't copy recursively.

I had some incantation that made cinstall work as well but I can't find it now.

Copy link
Collaborator Author

@rzumer rzumer Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# implies root, on my end moving the files with sudo seemed to set the owner to root and permissions also seem to match other libraries. I didn't run exactly those lines though but I also didn't change permissions or owner manually.

Suggesting a local installation seems okay to me though.

```

## Usage
Expand Down