I'm following the arrayfire-rust guide to set up my own Rust project. I can cargo build
, but when I cargo run
, I get unexpected results. If I run the program directly from the shell, I get the expected results.
$cargo run
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/xxx`
There are 0 available backends
$cargo build
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
$./target/debug/xxx
There are 2 available backends
main.rs:
extern crate arrayfire as af;
use af::*;
fn main() {
println!("There are {:?} available backends", get_backend_count());
}
Cargo.toml
[package]
name = "xxx"
version = "0.1.0"
authors = ["xxx"]
[dependencies]
arrayfire = "3.4.1"
I've filed an issue with the crate, and the maintainers are investigating.