-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Issue automatically imported from old repo: EmbarkStudios/rust-gpu#78
Old labels: t: tracking issue
Originally creatd by XAMPPRocky on 2020-10-21T09:57:13Z 👍: 18 🎉: 5 🚀: 2 👀: 5
This is a tracking issue for adding support for using Rust language features and the core
library with rustc_codegen_spirv
.
Language Support
- ClosuresEnums
- Data-less enums.
enum Foo { A, B }
- Algebraic data types.
enum Option<T> { Some(T), None }
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Loopsloop
while
for
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.if
match
Try (?
) operatorCompiles on stable- Blocked on stabilisation of
-Z codegen-backend
, also see Tracking Issue for -Z codegen-backend rust-lang/rust#77933
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Compiler & Library Support
- Debug buildsTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.IteratorsTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Features that don't work
- Dynamic Dispatch
- Pointer casts
- Unsized slices (
&[T]
)
About Tracking Issues
Tracking issues are meant for providing status updates on the progress of a feature, it's not meant for bug reports or discussions on a feature. Please instead file a new issue or join the #rust-gpu
channel on Discord.
Activity
rust-gpu-bot commentedon Nov 13, 2024
Comment from jarble on 2021-01-15T21:32:09Z
Will closures be supported as well?
rust-gpu-bot commentedon Nov 13, 2024
Comment from XAMPPRocky (MEMBER) on 2021-01-18T08:48:49Z
@jarble Closures are currently supported.
rust-gpu-bot commentedon Nov 13, 2024
Comment from eddyb (CONTRIBUTOR) on 2021-03-22T17:30:01Z 👍: 3
Should we update
README.md
and/ordocs
to indicate that e.g.for
loops are now supported?rust-gpu-bot commentedon Nov 13, 2024
Comment from mitchmindtree on 2021-06-10T12:25:42Z
Hi folks! Is it possible that rust-gpu may one day support trait objects? I'm currently implementing "ray tracing in one weekend" with
rust-gpu
and there are a couple cases likeHittable
andMaterial
where a trait allows for abstracting them nicely and a trait object would allow to work with collections of each with a little more ease. Being able to have world be a [&dyn Hittable; N] e.g. would allow for easily adding new objects to the world. I think support for ADTs would get us a lot of these same benefits where we specify different implementations under variants of an enum, though would lack the benefit of adding new variants in downstream crates.I realise what we can achieve when targeting SPIR-V is far more limited and that it might not be possible to achieve use of
&dyn Trait
, though my understanding of these limitations is limited, so just thought I'd ask!(edit: accidentally tapped "Comment" before finishing!)
rust-gpu-bot commentedon Nov 13, 2024
Comment from khyperia (CONTRIBUTOR) on 2021-06-10T12:36:29Z 👍: 1
I think at some point in the future, it may - however, we'd first have to get through a SPIR-V spec change to be able to support dynamic dispatch. The Slang folks are considering doing this (we've discussed a bit about what rust-gpu's needs would be if a SPIR-V feature for dynamic dispatch was proposed), but it's likely a ways off (if it happens at all), and then even further beyond that to let drivers implement it, and beyond that rust-gpu can start implementing it. So, I wouldn't hold your breath.
(
impl Trait
and friends all work 100% today, but yeah, unfortunately I don't think that's what you're asking)rust-gpu-bot commentedon Nov 13, 2024
Comment from tema3210 on 2021-12-30T21:16:51Z
What about plain function pointers then? AFAIK spirv doesn't support these at all.
rust-gpu-bot commentedon Nov 13, 2024
Comment from khyperia (CONTRIBUTOR) on 2022-01-03T08:25:20Z 👍: 2
Yep, SPIR-V doesn't support them at all right now. With the Slang folks considering pushing through an implementation for dynamic dispatch in SPIR-V, plain function pointers may be able to piggyback on the same infrastructure as well, we'll see (probably more likely than not some hack would make it work). However, we haven't heard any updates in a while (and our unrelated requests for changes/clarifications to the SPIR-V spec have not made much progress at all), so I wouldn't hold your breath.
rust-gpu-bot commentedon Nov 13, 2024
Comment from pyranota on 2024-01-05T13:56:19Z
Hey!
Is lifetimes supported in enums?
Im not sure if its
Data-less enums
orAlgebraic data types
rust-gpu-bot commentedon Nov 13, 2024
Comment from tuguzT on 2024-08-18T14:02:39Z
It seems that blockers of "debug builds" feature are all fixed at this moment.
I wonder if it is possible to implement such feature.