From fb5f7e4b0917e70046e5a79ea1485ffd7a765bc4 Mon Sep 17 00:00:00 2001 From: Szymon Zadworny Date: Tue, 11 Aug 2026 14:14:10 +0000 Subject: [PATCH 1/3] Add oneapi-rs meta crate --- Cargo.lock | 7 ++++ Cargo.toml | 2 +- README.md | 85 +------------------------------------------- oneapi-rs/Cargo.toml | 12 +++++++ oneapi-rs/README.md | 84 +++++++++++++++++++++++++++++++++++++++++++ oneapi-rs/src/lib.rs | 1 + 6 files changed, 106 insertions(+), 85 deletions(-) mode change 100644 => 120000 README.md create mode 100644 oneapi-rs/Cargo.toml create mode 100644 oneapi-rs/README.md create mode 100644 oneapi-rs/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index f43e115..fe1724e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,6 +272,13 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "oneapi-rs" +version = "0.0.9" +dependencies = [ + "sycl-rs", +] + [[package]] name = "pin-project" version = "1.1.13" diff --git a/Cargo.toml b/Cargo.toml index 3c10313..3313444 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "3" -members = ["sycl/sycl-rs", "sycl/sycl-rs-derive", "sycl/sycl-rs-sys"] +members = ["oneapi-rs","sycl/sycl-rs", "sycl/sycl-rs-derive", "sycl/sycl-rs-sys"] [workspace.package] edition = "2024" diff --git a/README.md b/README.md deleted file mode 100644 index ed34465..0000000 --- a/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# 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: - -```bash -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: - -```bash -cargo add sycl-rs -``` - -Make sure to source the `setvars.sh` file before building your project. - -```bash -source /opt/intel/oneapi/setvars.sh -cargo build -``` - -## Quick start - -Build the workspace from source: -```bash -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: - -```bash -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: - -```bash -cargo run -p sycl-rs --example kernel_launch -``` - -## Documentation - -- [API documentation](https://docs.rs/sycl_rs/) -- [Examples](sycl/sycl-rs/examples) -- [Contributing](CONTRIBUTING.md) -- [Changelog](CHANGELOG.md) - -## License - -Licensed under either the [Apache License 2.0](LICENSE-APACHE) or the -[MIT License](LICENSE-MIT), at your option. diff --git a/README.md b/README.md new file mode 120000 index 0000000..4ec8b52 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +oneapi-rs/README.md \ No newline at end of file diff --git a/oneapi-rs/Cargo.toml b/oneapi-rs/Cargo.toml new file mode 100644 index 0000000..50fafe5 --- /dev/null +++ b/oneapi-rs/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "oneapi-rs" +version = "0.0.9" +readme = "README.md" +edition.workspace = true +rust-version.workspace = true +license.workspace = true +repository.workspace = true +homepage.workspace = true + +[dependencies] +sycl-rs = { version = "0.0.9", path = "../sycl/sycl-rs" } diff --git a/oneapi-rs/README.md b/oneapi-rs/README.md new file mode 100644 index 0000000..ed34465 --- /dev/null +++ b/oneapi-rs/README.md @@ -0,0 +1,84 @@ +# 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: + +```bash +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: + +```bash +cargo add sycl-rs +``` + +Make sure to source the `setvars.sh` file before building your project. + +```bash +source /opt/intel/oneapi/setvars.sh +cargo build +``` + +## Quick start + +Build the workspace from source: +```bash +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: + +```bash +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: + +```bash +cargo run -p sycl-rs --example kernel_launch +``` + +## Documentation + +- [API documentation](https://docs.rs/sycl_rs/) +- [Examples](sycl/sycl-rs/examples) +- [Contributing](CONTRIBUTING.md) +- [Changelog](CHANGELOG.md) + +## License + +Licensed under either the [Apache License 2.0](LICENSE-APACHE) or the +[MIT License](LICENSE-MIT), at your option. diff --git a/oneapi-rs/src/lib.rs b/oneapi-rs/src/lib.rs new file mode 100644 index 0000000..260c844 --- /dev/null +++ b/oneapi-rs/src/lib.rs @@ -0,0 +1 @@ +pub use sycl_rs as sycl; From 22ea0993b364afea1fd523c4b1fae053c71200f1 Mon Sep 17 00:00:00 2001 From: Szymon Zadworny Date: Tue, 11 Aug 2026 14:17:59 +0000 Subject: [PATCH 2/3] Add LICENSE symlinks --- oneapi-rs/LICENSE-APACHE | 1 + oneapi-rs/LICENSE-MIT | 1 + 2 files changed, 2 insertions(+) create mode 120000 oneapi-rs/LICENSE-APACHE create mode 120000 oneapi-rs/LICENSE-MIT diff --git a/oneapi-rs/LICENSE-APACHE b/oneapi-rs/LICENSE-APACHE new file mode 120000 index 0000000..965b606 --- /dev/null +++ b/oneapi-rs/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/oneapi-rs/LICENSE-MIT b/oneapi-rs/LICENSE-MIT new file mode 120000 index 0000000..76219eb --- /dev/null +++ b/oneapi-rs/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file From 3f4ef578c48fd49d2ff1fc74d95c29116fabd6a6 Mon Sep 17 00:00:00 2001 From: Szymon Zadworny Date: Wed, 12 Aug 2026 11:08:45 +0000 Subject: [PATCH 3/3] Add oneapi-rs module documentation --- Cargo.toml | 2 +- oneapi-rs/src/lib.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3313444..b268118 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "3" -members = ["oneapi-rs","sycl/sycl-rs", "sycl/sycl-rs-derive", "sycl/sycl-rs-sys"] +members = ["oneapi-rs", "sycl/sycl-rs", "sycl/sycl-rs-derive", "sycl/sycl-rs-sys"] [workspace.package] edition = "2024" diff --git a/oneapi-rs/src/lib.rs b/oneapi-rs/src/lib.rs index 260c844..800c89d 100644 --- a/oneapi-rs/src/lib.rs +++ b/oneapi-rs/src/lib.rs @@ -1 +1,29 @@ +// +// Copyright (C) 2026 Intel Corporation +// +// Under the MIT License or the Apache License v2.0. +// See LICENSE-MIT and LICENSE-APACHE for license information. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// + +//! # oneAPI-rs +//! oneAPI is an open, cross-industry, standards-based, unified, multiarchitecture, multi-vendor +//! programming model that delivers a common developer experience across accelerator architectures +//! – for faster application performance, more productivity, and greater innovation. +//! +//! This crate provides Rust bindings for oneAPI libraries. For more information check out each +//! module's documentation. +//! +//! # System dependencies +//! Make sure to install the [Intel oneAPI toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneapi-toolkit-download.html). +//! Then source the `setvars.sh` file: +//! ```bash +//! source /setvars.sh +//! ``` +//! +//! This project was tested on oneAPI Toolkit 2026.1 and requires the Unified Runtime over Level Zero +//! driver version 1.14.37020 or newer. For more detailed information check out the +//! [required extensions](crate#required-extensions) section. + +#[doc(inline)] pub use sycl_rs as sycl;