Skip to content

Commit 4e7dee9

Browse files
committed
Instructions on how to use crate from crates.io
1 parent 89638d9 commit 4e7dee9

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "arrayfire"
33
description = "ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs. This crate provides Rust bindings for ArrayFire library."
4-
version = "3.2.0"
4+
version = "3.2.0-rc0"
55
documentation = "http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html"
66
homepage = "https://github.com/arrayfire/arrayfire"
77
repository = "https://github.com/arrayfire/arrayfire-rust"

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,26 @@
66

77
You can find the most recent updated documentation [here](http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html).
88

9-
## Build
9+
## Supported platforms
10+
11+
Currently, only Linux and OSX. With Rust 1.4(MSVC binary), we soon expect to get the Windows support available.
12+
13+
## Use from Crates.io
14+
15+
To use the rust bindings for ArrayFire from crates.io, the following requirements are to be met
16+
first.
17+
18+
1. [Download and install ArrayFire binaries](https://arrayfire.com/download) based on your operating
19+
system.
20+
2. Set the evironment variable `AF_PATH` to point to ArrayFire installation root folder.
21+
3. Make sure you add the path to library files to your path environment variables.
22+
- On Linux & ODX: do `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AF_PATH/lib`
23+
- On Windows: Add `%AF_PATH%\lib` to your PATH environment variable.
24+
4. Add `arrayfire = "3.2.0"` to the dependencies section of your project's Cargo.toml file.
25+
26+
Once step (4) is over, you should be able to use ArrayFire in your Rust project. If you find any bugs, please report them [here](https://github.com/arrayfire/arrayfire-rust/issues).
27+
28+
## Build from Source
1029

1130
Edit [build.conf](build.conf) to modify the build flags. The structure is a simple JSON blob. Currently Rust does not allow key:value pairs to be passed from the CLI. To use an existing ArrayFire installation modify the first three JSON values. You can install ArrayFire using one of the following two ways.
1231

@@ -24,8 +43,6 @@ cargo build
2443
- [Linux dependencies](http://www.arrayfire.com/docs/using_on_linux.htm)
2544
- [OSX dependencies](http://www.arrayfire.com/docs/using_on_osx.htm)
2645

27-
Operating System Support: Currently, only Linux and OSX. With Rust 1.4(MSVC binary), we soon expect to get the Windows support available.
28-
2946
## Example
3047

3148
```rust

0 commit comments

Comments
 (0)