Support no_std where possible (specifically for wasm32v1-none) #6826
Labels
help required
We need community help to make this happen.
platform: wasm
Issues with webassembly
type: enhancement
New feature or request
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: