embree3-arm

Crates.ioembree3-arm
lib.rsembree3-arm
version0.3.10
sourcesrc
created_at2024-10-30 13:47:32.98659
updated_at2024-10-30 16:08:01.889008
descriptionA wrapper for the Embree ray tracing kernels.
homepagehttps://github.com/Twinklebear/embree-rs
repositoryhttps://github.com/Twinklebear/embree-rs
max_upload_size
id1428544
size205,772
Elysidox (RealElysidox)

documentation

https://docs.rs/embree/

README

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.

Commit count: 182

cargo fmt