11 releases

0.2.8 Feb 10, 2024
0.2.7 Jan 5, 2024
0.2.6 Dec 5, 2023
0.2.5 Sep 9, 2022
0.1.1 Aug 2, 2022

#453 in Development tools

22 downloads per month

ISC license

79KB
2K SLoC

Rust 1.5K SLoC // 0.0% comments OCaml 250 SLoC // 0.1% comments

futhark-bindgen

A Futhark binding generator.

futhark-bindgen uses the manifest created by Futhark to generate bindings for multiple languages.

Supported languages:

  • Rust
  • OCaml

Installation

With cargo:

$ cargo install futhark-bindgen

From source:

$ make install PREFIX=~/.local/bin

Command-line usage

$ futhark-bindgen run test.fut test.rs # Rust output to ./test.rs
$ futhark-bindgen run test.fut test.ml # OCaml output to ./test.ml

The --backend flag can be used to select which Futhark backend to use: c, multicore, cuda, opencl or ispc

See the output of futhark-bindgen --help for more information

Example projects

Dependencies

~0.7–1.7MB
~36K SLoC