# gpuikit
[](https://crates.io/crates/gpuikit)
[](https://docs.rs/gpuikit)
[](https://github.com/iamnbutler/gpuikit/actions/workflows/ci.yml)
> 🚧 Pre-1.0: expect breaking changes in every release. Pin your version. 🚧
A UI toolkit for [gpui](https://www.gpui.rs) applications. Targeting a conceptual union of SwiftUI and web-style component libraries to make building modern gpui applications seamless.
[See it in action →](https://nate.rip/gpuikit-demo/)

## Getting started
gpuikit builds against
[gpui-unofficial](https://github.com/iamnbutler/gpui-unofficial), a crates.io
distribution of gpui — your app should depend on the same one:
```toml
[dependencies]
gpui = { package = "gpui-unofficial", version = "1.14" }
gpuikit = "0.8"
```
```rust
use gpui::Application;
fn main() {
Application::new()
.with_assets(gpuikit::assets())
.run(|cx| {
gpuikit::init(cx);
// ... your app
});
}
```
Browse every component in the showcase:
```sh
cargo run --example showcase --features examples
```
More examples, and how to run them, in [examples/](examples/README.md). API
docs are at [docs.rs/gpuikit](https://docs.rs/gpuikit).
## Feature flags
All off by default:
| `editor` | The `Editor` component, and syntect-based syntax highlighting for markdown code fences |
| `stitch` | Flicker-free streaming markdown: unterminated syntax (`**bold`) is closed before parsing. Requires Rust 1.95 |
| `runtime_shaders` | Compiles Metal shaders at runtime, so macOS builds don't need the Xcode Metal toolchain |
| `schema` | Adds the `schemars` dependency |
## Web
gpuikit runs in the browser on gpui's web platform (WebGPU via wgpu):
[live demo](https://nate.rip/gpuikit-demo/), built from
[gpuikit-demo](https://github.com/iamnbutler/gpuikit-demo), which also
documents the wasm build setup.
## Minimum Rust version
1.85, or 1.95 with the `stitch` feature. Some dependencies require newer
stables, so prefer a recent toolchain.
## License
Licensed under either of the [Apache License 2.0](LICENSE-APACHE) or the
[MIT license](LICENSE-MIT), at your option.