#embree #ray #bvh #simd #ray-tracing

embree3-arm

A wrapper for the Embree ray tracing kernels

3 releases

Uses old Rust 2015

0.3.10 Oct 30, 2024
0.3.9 Oct 30, 2024
0.3.8 Oct 30, 2024

#135 in Graphics APIs

MIT license

205KB
7K SLoC

embree3-arm

Crates.io Build Status

Rust bindings to Embree. Forked from embree-rs, and relinked by dynamical lib generated from Embree on MacOS with arm architecture. Only apply for using the embree-rs in v0.3.8 edition on MacOS arm.

Usage

When trying to extern crate embree3_arm as embree, follow these steps:

  1. add this build.rs in the workspace of the rust program:
use std::env;
use std::path::PathBuf;

fn main() {
    println!("{:?}", env::var("EMBREE_DIR"));
    if let Ok(e) = env::var("EMBREE_DIR") {
        let mut embree_dir = PathBuf::from(e);
        embree_dir.push("lib");
        println!("cargo:rustc-link-search=native={}", embree_dir.display());
        println!("cargo:rerun-if-env-changed=EMBREE_DIR");
    }
    println!("cargo:rustc-link-lib=embree3");
}
  1. Set the workspace to the following env variable:
export EMBREE_DIR=`pwd`
  1. Download compressed libembree from github release page, and move the lib folder to the root dir of rust program.

  1. cargo build && cargo run, then copy libembree3.3.13.4.dylib, libembree3.3.dylib and libembree3.dylib to ./target/debug or ./target/release

  2. try cargo run again.

Dependencies

~450KB