-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
A-dispatch2Affects the `dispatch2` crateAffects the `dispatch2` crateA-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themquestionThere is no such thing as a dumb one!There is no such thing as a dumb one!
Description
In gfx-rs/wgpu#8886 we ran into a situation where we had to introduce a dependency on dispatch2 solely because we wanted to use MTLDevice::newLibraryWithData_error, which takes a DispatchData argument. Since DispatchData is just a block of bytes, this seemed a bit silly; a more Rustic API would just take &[u8].
Would it make sense to offer an additional Rust function in MTLDevice that accepted the library data as a &[u8] and passed it through to the Objective C MTLDevice.newLibraryWithData:error: method somehow, without requiring the dispatch2 feature to be enabled, and without adding dispatch2 to the crate's dependencies?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-dispatch2Affects the `dispatch2` crateAffects the `dispatch2` crateA-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themquestionThere is no such thing as a dumb one!There is no such thing as a dumb one!