emu_core is a library that serves as a compute-focused abstraction over WebGPU. Despite its name, WebGPU allows Emu to support most platforms (through Vulkan, Metal, DX) and eventually even the web itself (through WebAssembly - API changes to support this should be minimal).

You can see the crate for how to add Emu to your Rust project ( emu_core = "*" ) and the examples for how to use Emu. The following link to documentation of what are essentially the building blocks of Emu.

See Device and pool for the lowest-level, core primitives abstracting directly over WebGPU

and for the lowest-level, core primitives abstracting directly over WebGPU See DeviceBox<T> , AsDeviceBoxed , IntoDeviceBoxed for boxing data on the GPU

, , for boxing data on the GPU See SpirvBuilder , Glsl , GlslKernel for simple source languages to use for writing compute kernels

, , for simple source languages to use for writing compute kernels See compile for compiling source language to SpirvOrFinished and then finishing to DeviceFnMut

for compiling source language to and then finishing to See spawn for spawning threads on GPU and launching compiled kernels ( DeviceFnMut s)

for spawning threads on GPU and launching compiled kernels ( s) See pool 's pool / select / take for managing the global pool of devices

's / / for managing the global pool of devices See assert_device_pool_initialized

Note that Device and pool are the lowest-level building blocks for the rest of Emu and as such, you could technically use either just Device and pool or just the rest of Emu. In practice though, you will probably do both. You will use the rest of Emu for most of your application/library and then drop down to low-level Device -and- pool usage in rare cases when you want to work with the underlying WebGPU data (maybe to mix in graphics with your compute) structures or to have finer control over certain parameters.

And about features - there is 1 feature that by default is switched off - glsl-compile . You should enable this feature if you would like to use Glsl or GlslKernel . This feature has one important dependency - shaderc . In the future, when a Rust-based GLSL-to-SPIR-V compiler is finished (there is work going towards this), there will be a simpler pure-Rust dependency but until then, you should follow steps here to ensure the platforms you target will have shaderc . Of course, if you really don't want to use shaderc , you could always compile your code to SPIR-V at compile time and then use SPIR-V as input to Emu.

Also, some basic guides that will likely be helpful in using Emu are the following.