4 releases
0.3.1 | Apr 19, 2025 |
---|---|
0.3.0 | Jan 22, 2025 |
0.2.2 | May 21, 2024 |
0.2.1 |
|
0.2.0 | Apr 17, 2024 |
#192 in macOS and iOS APIs
630,416 downloads per month
Used in 1,170 crates
(31 directly)
6.5MB
120K
SLoC
Bindings to the Metal
framework
See Apple's docs and the general docs on framework crates for more information.
Metal has tools for validating that you're using it correctly, using these
is highly recommended! See Apple's documentation on it, or
run man MetalValidation
to get information on environment variables.
NOTE: To use MTLCreateSystemDefaultDevice
you need to link to
CoreGraphics
, this can be done by using objc2-core-graphics
, or by
doing:
#[link(name = "CoreGraphics", kind = "framework")]
extern "C" {}
Example
Drawing a rotating triangle.
With the following shader.
objc2-metal
Rust bindings to Apple's framework Metal.
This README is kept intentionally small to consolidate the documentation, see the Rust docs for more details on this crate.
This crate is part of the objc2
project,
see that for related crates.