#wm #platform-agnostic #cross-platform #manager #graphics

window

Minimal Rust code for creating a window, automatically choosing a backend window manager and graphics API

7 releases (4 breaking)

0.5.0 Jan 5, 2021
0.4.1 Nov 20, 2020
0.4.0 Jul 14, 2020
0.3.1 Feb 15, 2020
0.1.0 Jul 7, 2019

#27 in Rendering engine

Download history 4/week @ 2020-12-22 5/week @ 2020-12-29 239/week @ 2021-01-05 147/week @ 2021-01-12 19/week @ 2021-01-19 9/week @ 2021-01-26 4/week @ 2021-02-02 17/week @ 2021-02-09 44/week @ 2021-02-16 10/week @ 2021-02-23 10/week @ 2021-03-02 6/week @ 2021-03-09 8/week @ 2021-03-16 20/week @ 2021-03-23 23/week @ 2021-03-30 12/week @ 2021-04-06

179 downloads per month
Used in 2 crates

Apache-2.0 OR MIT OR BSL-1.0

150KB
3.5K SLoC

Window Logo

Changelog | Source | Getting Started

tests docs crates.io

Minimal Rust code for creating a window, automatically choosing a backend window manager and graphics API.

Other Rust window creation libraries require you to build for a specific backend, so I made this crate to fix the issue. You can now make a program that runs Wayland on a machine that has Wayland installed, and will fall back to XCB if it's not installed. And, will run OpenGLES (eventually try Vulkan first, too) if it's installed, and fall back to OpenGL if it's not installed.

Since this crate is minimal, it doesn't even handle window decoration. If you want window decoration and GUI widgets, check out cala which depends on this crate.

Check out the documentation for examples.

Features

  • Linux Wayland Support
  • Linux OpenGLES Support

Planned Features

  • XCB
  • Windows WinAPI
  • Android
  • MacOS Cocoa
  • Redox
  • Nintendo Switch
  • XBOX
  • PlayStation
  • Wasm
  • OpenGL
  • WebGL
  • Vulkan

Supported Platforms

Human targets all platforms that can run Rust, including:

  • Linux
  • Web Assembly doesn't work yet
  • Windows doesn't work yet
  • Mac OS doesn't work yet
  • BSD doesn't work yet
  • Android (may partially or fully work, but untested) doesn't work yet
  • iOS / various game consoles doesn't work yet
  • Redox doesn't work yet
  • Fuchsia doesn't work yet
  • Others? (make a PR)

License

Licensed under any of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as described above, without any additional terms or conditions.

Help

If you want help using or contributing to this library, feel free to send me an email at aldaronlau@gmail.com.

Dependencies

~0.5–2MB
~44K SLoC