#futhark #bindings #bindgen

bin+lib futhark-bindgen

Futhark binding generator

11 releases

new 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

#89 in FFI

Download history 15/week @ 2023-10-26 2/week @ 2023-11-02 1/week @ 2023-11-09 9/week @ 2023-11-16 20/week @ 2023-11-23 57/week @ 2023-11-30 10/week @ 2023-12-07 11/week @ 2023-12-14 18/week @ 2023-12-21 12/week @ 2023-12-28 31/week @ 2024-01-04 5/week @ 2024-01-11 11/week @ 2024-01-18 20/week @ 2024-01-25 22/week @ 2024-02-01 27/week @ 2024-02-08

82 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.5MB
~35K SLoC