Skip to content

Conversation

@nnethercote
Copy link
Collaborator

Having to manually exclude the OptiX crates is a pain. Let's just comment them out in the top-level Cargo.toml.

And before doing that, let's rearrange that top-level Cargo.toml and the examples to make things much clearer, e.g. putting all the OptiX-dependent examples in the same directory.

@nnethercote nnethercote requested a review from LegNeato November 21, 2025 02:55
@nnethercote nnethercote force-pushed the disable-optix branch 7 times, most recently from 344cd6f to ee47bee Compare November 26, 2025 04:16
Currently the top-level `Cargo.toml` lists members both explicitly
(direct naming) and implicitly (using globs). The latter is annoying,
and makes it hard to tell what the actual packages in the workspace are,
particularly with the complex `cargo --workspace --exclude` invocations
in CI.

This commit makes all the member explicit and puts them in alphabetical
order.
For consistency with the examples in `examples/` and `samples/`, which
all put their kernel code in `kernels/`.
For consistency with the examples in `examples/` and `samples/`, which
all put their kernel code in `kernels/`.
Now that the `examples/optix/` directory is gone, the `cuda/`
subdirectory isn't needed.
@nnethercote
Copy link
Collaborator Author

I rebased for the addition of the i128_demo example. Looking forward to a vanilla cargo build working without needing half a dozen --exclude options :)

Because they don't work without OptiX, which is less important than CUDA
and a pain to install.

This means we don't have to manually exclude all these crates in CI,
which is nice -- e.g. a vanilla `cargo build` works.

Also, on Linux CI we don't need `--exclude "cudnn*"`. (We still need it
on Windows CI.)
@LegNeato LegNeato merged commit 9bc2a74 into Rust-GPU:main Nov 27, 2025
11 checks passed
@nnethercote nnethercote deleted the disable-optix branch November 27, 2025 22:41
nnethercote added a commit to nnethercote/Rust-CUDA that referenced this pull request Dec 3, 2025
In Rust-GPU#313 I disabled all the code relying on OptiX. I subsequently learned
that the path-tracer's use of OptiX is optional. This commit re-enables
it, and makes the optionality (via features) more strict so it works on
systems without OptiX.

Note: If you were rewriting this from scratch you'd probably group
together the OptiX-dependent code pieces more nicely, but I just
scattered `#[cfg(feature = "optix")]` attributes around to keep the
modifications as small as possible.
nnethercote added a commit to nnethercote/Rust-CUDA that referenced this pull request Dec 3, 2025
In Rust-GPU#313 I disabled all the code relying on OptiX. I subsequently learned
that `path-tracer`'s use of OptiX is optional. `path-tracer` is a big
and good example, so this commit re-enables it, but with the
OptiX-specific bits commented out. (Commenting out code is crude, but I
had trouble with features, as detailed within the commit. This is better
than nothing.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants