-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create testing corpus of rust constructs #51
Comments
Potentially useful: |
We could also come at it from the other direction and maintain a list of constructs known to produce compilation errors, and not worry about it being exhaustive? I have the beginnings of such a list. The benefit being that this would have the lowest barrier to getting something. |
Looks like there might be a version of rustlantis with https://www.reddit.com/r/rust/comments/1gzhi7x/comment/lyx3l5y/ |
@FractalFir Hello! Thanks for your offer to help (https://www.reddit.com/r/rust/comments/1gzhi7x/comment/lz85d66/). Let's repurpose this task if that works for you. What can I do to make it so we can leverage your fork? I understand there are likely some additional changes we'll need to do to rustlantis once we get it all hooked up as our reqs are a bit different. I can invite you to our maintainers zulip if you would prefer chat! It might be useful anyway as we are all working on out-of-tree codegen backends 🍻 . |
I would gladly join your zulip :). There are a few things required to get my fork working with The first step is creating the right The next issue is getting the I also assume you support a relatively recent version of Rust(my fork requires support for c-string literals), so that probably will not be an issue. We will also need some kind of runner program, capable of loading the shader, and executing it on the gpu. Rustlatins has a built-in script for compiling and comparing code using different backends, but it is not well suited for backends which require a non-standard excution enviorments(eg. need to run in the .NET runtime, or on the GPU). That script also assumes that all backends compile the same code, which may be a bit difficult to pull off. For my own purposes, I simply wrote a custom rust script for that purpose, since that was easier than getting the solution built-in into rustlatis to work well with my backend. Also, I think I saw somehwere that you don't support overflow checks for multiplcation / additon, which are required by rustlatnis. This may be already fixed(since I saw that some time ago), but if this is still an issue, maybe I could share my soltuion to it. |
I had a bit of free time to work on this, and I am mostly done with changes to When the However, the generated code currently does not compile, mostly due to some... wonkines around the In C
Since those are not supported by the vulcan extension, there is no easy way to print 64 bit signed ints from rust-gpu. There are workarounds, but they are not very efficent. The simplest solution is printing the sign first, and the rest of the 64 signed intiger as an 64 unsinged int. As for the bug in rust-gpu implementation of this macro,
Besides that, there are some issues with the
I don't think this is a rustc version issue, since I am running the exact same files on the newest nightly(they run just fine), and I have not changed them in almost a year. EDIT: found another bug in the
It seems to get confused by two format specifier without a separator. This line of code: rust-gpu/crates/spirv-std/macros/src/lib.rs Line 480 in d3f9af7
simply skips all EDIT2: unsure if this is a bug, but the KhronosGroup/Vulkan-ValidationLayers#8341 64 bit signed ints also seem to have recently(October) gained some support, so I am unsure if this is something |
Oh wow, that was quick! 🚀 I fully expected there to be some debug_printf bugs as it has only been around for one release. I'll try to take a look at fixing in the next couple of days. For truly unsupported things we can probably just swallow it for now as we are looking first and foremost for compilation issues before we move onto runtime issues. @eddyb has changes to update us to a newer rustc that should hopefully land today 🤞 |
I managed to fix one of the issues with |
Landed. Sorry, I screwed something up w/ git when trying to fix the formatting. |
The project doesn't currently support all rust constructs. It's not clear what is supported and what is not, so users will suddenly trip over issues.
One idea to generate such a list is to try to compile (not run) all no_std and no alloc crates on crates.io and see which fail...similar to what miri does.
Another way would be to create a rust program generator and "fuzz".
The text was updated successfully, but these errors were encountered: