The goal of the project is to make a showcase how to use C++ written library from Rust application. The project uses cxx crate to build the C++ <-> Rust bridge. This is example from DepthAI Examples for encoding rgb to h265 - the example uses DepthAI Core Library and records/writes H265 stream to the disk.
Clone the repository using recursive for submodules:
git clone --recurse-submodules https://github.com/npenkov/depthai-rgb-encoding-example-rs.git
or simply clone the reposity and run
git submodule update --init --recursive
Build and install depthai-core
-
Option 1:
cd deps/depthai-core mkdir -p build cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON' -D'DEPTHAI_BUILD_EXAMPLES=ON' cmake --build build --parallel 4 cmake --build build --target install
-
Option 2:
make build-depthai
make run
Using C++ library From Rust - DepthAI RGB Camera Example
or: