Skip to main content

cargo_futhark/
lib.rs

1#![warn(missing_docs)]
2
3//! # cargo-futhark
4//!
5//! A library and cargo subcommand to conveniently integrate [Futhark](https://futhark-lang.org/) into Rust projects.
6//!
7//! See the [usage section](https://github.com/luleyleo/cargo-futhark#usage) in the readme to get started with the CLI.
8//! This documentation will focus on the code generation aspect of this crate.
9//!
10//! ## Generating Bindings
11//!
12//! The core of this library is the [`Generator`].
13//! Using it, you can automatically generate safe bindings for your Futhark code.
14//! Take a look at its documentation to understand how it works.
15//!
16//! ## Using Generated Bindings
17//!
18//! Once you've generated the bindings, including them is as easy as this:
19//! ```ignore
20//! include!(concat!(env!("OUT_DIR"), "/futhark/futhark_lib.rs"));
21//! ```
22//!
23
24mod manifest;
25mod template;
26
27mod target;
28pub use target::Target;
29
30mod generator;
31pub use generator::Generator;
32
33pub use eyre::Result;