oneapi-rs 0.1.0

Rust bindings for oneAPI
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 30.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.7 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • oneapi-src/oneapi-rs
    3 3 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oneapi-rs

oneAPI-rs

Rust bindings for SYCL and the Intel oneAPI programming environment.

[!WARNING] SYCL-rs is experimental, has not released version 0.1.0, and is not ready for production use. Its API may change without notice.

Supported platforms

The tested configuration is:

  • Linux
  • Intel oneAPI Toolkit 2026.1
  • A SYCL device supported by the installed oneAPI runtime

Other operating systems, oneAPI releases, and SYCL implementations are not currently tested or supported.

Prerequisites

  • A Rust toolchain with Rust 2024 edition support
  • Intel oneAPI Toolkit 2026.1, including the DPC++/C++ compiler and SYCL runtime

Initialize the oneAPI environment before building or running the project:

source /opt/intel/oneapi/setvars.sh

Replace /opt/intel/oneapi if the toolkit is installed elsewhere. The build also accepts an explicit compiler through ONEAPI_CXX; the compiler must support C++17 and SYCL.

Installation

Add your required dependencies with Cargo:

cargo add sycl-rs

Make sure to source the setvars.sh file before building your project.

source /opt/intel/oneapi/setvars.sh
cargo build

Quick start

Build the workspace from source:

git clone https://github.com/oneapi-src/oneapi-rs.git
cd oneapi-rs
source /opt/intel/oneapi/setvars.sh
cargo build --workspace

List the SYCL devices visible to the runtime:

source /opt/intel/oneapi/setvars.sh
cargo run -p sycl-rs --example sycl-ls

The kernel launch examples demonstrate allocation, runtime kernel compilation, kernel submission, and copying results back to the host:

cargo run -p sycl-rs --example kernel_launch

Documentation

License

Licensed under either the Apache License 2.0 or the MIT License, at your option.