| Crates.io | julia |
| lib.rs | julia |
| version | 0.2.5 |
| created_at | 2017-11-13 20:09:22.582654+00 |
| updated_at | 2017-11-16 19:51:58.805756+00 |
| description | Idiomatic and safe Julia bindings for Rust |
| homepage | https://github.com/pi-pi3/julia-rs |
| repository | https://github.com/pi-pi3/julia-rs |
| max_upload_size | |
| id | 39251 |
| size | 119,304 |
Safe and idiomatic Julia bindings for Rust
[dependencies]
julia = "0.2"
...
As an example application, an interactive Julia REPL written in 100% safe Rust
is included. See its source at src/main.rs, build with
cargo build and run with cargo run. See julia-rs -h or cargo run -- -h
for help.
See examples for more examples.
fn main() {
use julia::api::{Julia, Value};
let mut jl = Julia::new().unwrap();
jl.eval_string("println(\"Hello, Julia!\")").unwrap();
// Hello, Julia!
let sqrt = jl.base().function("sqrt").unwrap();
let boxed_x = Value::from(1337.0);
let boxed_sqrt_x = sqrt.call1(&boxed_x).unwrap();
let sqrt_x = f64::try_from(boxed_sqrt_x).unwrap();
println!("{}", sqrt_x);
// 36.565010597564445
}
julia-rs is licensed under the zlib/libpng license. See LICENSE or zlib.net/zlib_license.html for details.