Skip to content
This repository has been archived by the owner on Nov 18, 2019. It is now read-only.

lu-zero/crav1e

Repository files navigation

C rav1e API - Historical

LICENSE dependency status Build Status Build Status

cbindgen-based API for C/C++ users.


NOTE: rav1e integrates with cargo-c to directly provide the C-API. From the release 0.1.0 you should use cargo-c and rav1e directly.


Status

The C-API is now part of rav1e. DO NOT USE THIS REPOSITORY

Usage

You may generate the library and the header file using a simple Makefile or calling cargo build.

The Makefile supports installing the library, the header and the pkg-config file.

Makefile

A quite simple makefile is provided:

# Build librav1e.a, rav1e.h and rav1e.pc
$ make
# Install librav1e.a, rav1e.h and rav1e.pc
$ make DESTDIR=${D} prefix=${prefix} libdir=${libdir} install
# Remove librav1e.a, rav1e.h and rav1e.pc
$ make DESTDIR=${D} prefix=${prefix} libdir=${libdir} uninstall

cargo

Currently cargo install does not work for libraries.

$ cargo build

or

$ cargo build --release

The header will be available as include/rav1e.h, the library will be in target/<debug or release>/librav1e.<so or dylib> Look in c-examples for working examples.

Windows binaries

Automated Windows binaries (x86-64 and ARM64) are generated by AppVeyor (available for download under the Artifacts tab).

Developing

I suggest to use the cargo paths override to have a local rav1e:

# Clone the trees
$ git clone https://github.com/xiph/rav1e
$ git clone https://github.com/lu_zero/crav1e
# Setup the override
$ cd crav1e
$ mkdir .cargo
$ echo 'paths=["../rav1e"]' > .cargo/config
# Check it is doing the right thing
$ cargo build