3 releases
Uses old Rust 2015
0.3.10 | Oct 30, 2024 |
---|---|
0.3.9 | Oct 30, 2024 |
0.3.8 | Oct 30, 2024 |
#100 in Graphics APIs
376 downloads per month
205KB
7K
SLoC
embree3-arm
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:
- 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");
}
- Set the workspace to the following env variable:
export EMBREE_DIR=`pwd`
- Download compressed libembree from github release page, and move the
lib
folder to the root dir of rust program.
-
cargo build && cargo run
, then copylibembree3.3.13.4.dylib
,libembree3.3.dylib
andlibembree3.dylib
to./target/debug
or./target/release
-
try
cargo run
again.
Dependencies
~450KB