Crates.io | witer |
lib.rs | witer |
version | 0.11.4 |
source | src |
created_at | 2024-03-10 17:05:59.736604 |
updated_at | 2024-04-02 02:03:07.069909 |
description | An iterator-based Win32 windowing library |
homepage | |
repository | https://github.com/witer-rs/witer |
max_upload_size | |
id | 1168806 |
size | 308,355 |
witer
use witer::prelude::*;
fn main() {
// Build
let window = Window::builder()
.with_title("My App")
.with_size(LogicalSize::new(800.0, 500.0))
.build()
.unwrap();
// Run
for message in &window {
if let Message::Key { .. } = message {
println!("{message:?}");
}
}
}
The main goal of witer
is to have a simple, easy-to-use API. The target audience is developers looking to create
a window quickly, easily, and idiomatically. I aim to have feature-parity with winit
eventually as a secondary goal.
Cross-platform support is highly unlikely, but pull requests are welcomed if anyone else wants to tackle it.
egui
support is experimental and a point of active development. OpenGL context creation is similarly under active development.
⚠️ Warning ⚠️ This project is still hilariously incomplete and may contain major bugs. I am only one student, after all, so please report any and all issues or feature requests!
Documentation is a work-in-progress as the crate evolves. Don't expect much here yet, so if you have any questions, either:
In the future, when the API settles down, I plan to make migration guides between releases. For now, I recommend referencing the examples if there are any doubts.
rwh_05
/ rwh_06
: use the appropriate version of raw-window-handle
. rwh_06
is the default.You can find examples in the examples folder. You can also see the vulkano branch of
foxy-rs/foxy, which as of the time of writing is utilizing witer
, but
is subject to change.
You can get in contact through the discord linked at the top, or post in the Discussions tab on GitHub.
Alternatively, you can email me at dev.gabriel.lugo@gmail.com
Q: Why not winit
?
A: While winit
is the best choice for pretty much everyone, I found that multithreading the windows message pump
could lead to performance gains (unsubstantiated). Additionally, I was simply not satisfied with the way the winit
API
looks and feels. If you are perfectly satisfied with what winit
offers, then I recommend you stick with it.
Q: What happened to ezwin
?
A: I wanted a name that was more inline with the ideas and goals behind the project. Additionally, I wanted a chance
to pull the project back to v0.x.y
to reflect its volatile nature. This isn't currently possible with Crates.io (ignoring
yanking). Furthermore, the v3.x.y
could be seen as confusing for those who didn't understand why they existed.