Description
Motivation
In the GpuDeviceDescriptor
generated struct in web_sys
, we don't get access to the required_limits
api since it has a WebIDL type of record<DOMString, GPUSize64> requiredLimits;
. The relevant piece of code which omits the record
type is here.
WGPU needs access to this particular field to be able to request a device with limits other than the bare minimum.
Proposed Solution
A kind of Record
type added into js_sys
, since it seems that the blocker (reasonably) is the lack of a Record
type in js_sys
. Exactly how this would look is something I'm not sure, hence why this is an issue and not a PR, and am welcoming discussion.
Alternatives
We could also simply ignore the type constraints we are supposed to follow for record
types and allow any keys. However, this would be unwanted since you could get silent or cryptic errors since the api you are communicating with may recieve unexpected types as the keys.