-
Notifications
You must be signed in to change notification settings - Fork 970
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
Support no_std where possible (specifically for wasm32v1-none) #6826
Comments
I think there's value in having even just a subset of |
This would also be useful for porting to game consoles, particularly console homebrew. |
We're definitely interested in having this, but will need to be from an outside contributor, so PR's welcome! I think that it is important that when the first PR comes in to partially support no-std, we have a CI job to make sure we don't break it in the future. That could be as simple as adding this wasm target to CI. |
@bushrat011899 wrote in #6892 (comment):
@bushrat011899 I am working on this update for I may consider hacking on Hope I am not stepping on any toes. |
Not at all! Just happy to have more people working on |
FYI I have now got no-std build working with naga in my workarea, with really ugly hacking - unfortunately I need to take rest after a very long day, hope to raise a PR for this before the weekend. I have ended up learning quite a bit from this :) P.S. Here is the branch I pushed to backup my workarea: https://github.com/brodycj/wgpu/tree/wipsave34asdf This is based on PR #6926 for wgpu-core, only recommended for the super-brave! |
Is your feature request related to a problem? Please describe.
naga
,wgpu
and related crates should havestd
as a (default) feature, specifically forwasm32v1-none
support.Describe the solution you'd like
There's a hope to get the wasm ecosystem slowly shifting from
wasm32-unknown-unknown
towasm32v1-none
, which is hopefully stabilizing in rust 1.84. This is primarily becausewasm32-unknown-unknown
is something of a moving target and can change the browser requirements at will, which we recently discovered when older Safari stopped working 😅The main differences between
wasm32v1-none
andwasm32-unknown-unknown
are:Unfortunately, no_std is both a blessing and a curse: it's neat to get things using core/alloc where possible, but it sucks that the majority of the ecosystem needs churn to make this viable.
I've done a quick investigation and I think it's plausible to get at least web working in
no_std
, but potentially other platforms too.wgpu-types
is the easiest to getno_std
, it only needs it for one specific dx12 config.naga
is possibly the second easiest crate, but it requires some work in dependencies. wgpu-core and wgpu-hal will need more work mostly surrounding the use of mutexes.Describe alternatives you've considered
We could just not, but that means it's impossible to allow users of wgpu to have any control over which browsers they support.
We can also limit this to a specific set of features, there's no real need today for DX12 and
no_std
, for example.The text was updated successfully, but these errors were encountered: