{"id":13626188,"url":"https://github.com/hadronized/luminance-rs","last_synced_at":"2026-01-18T00:20:17.951Z","repository":{"id":5625934,"uuid":"53590714","full_name":"hadronized/luminance-rs","owner":"hadronized","description":"Type-safe, type-level and stateless Rust graphics framework","archived":false,"fork":false,"pushed_at":"2023-03-20T04:59:16.000Z","size":33654,"stargazers_count":1101,"open_issues_count":46,"forks_count":58,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-12T16:08:40.916Z","etag":null,"topics":["gpu","graphics","opengl","rust","shaders","vulkan","webgl"],"latest_commit_sha":null,"homepage":"https://phaazon.github.io/learn-luminance/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hadronized.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-10T14:27:03.000Z","updated_at":"2025-05-09T22:13:54.000Z","dependencies_parsed_at":"2023-02-15T12:46:11.138Z","dependency_job_id":"99b4165a-53e3-46c2-9e89-32a4d8e09e0c","html_url":"https://github.com/hadronized/luminance-rs","commit_stats":{"total_commits":1772,"total_committers":38,"mean_commits":46.63157894736842,"dds":0.08465011286681712,"last_synced_commit":"f01df4b5e57384e88cbef699c8778cb56bd66cef"},"previous_names":["hadronized/luminance-rs","phaazon/luminance-rs"],"tags_count":236,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fluminance-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fluminance-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fluminance-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fluminance-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadronized","download_url":"https://codeload.github.com/hadronized/luminance-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpu","graphics","opengl","rust","shaders","vulkan","webgl"],"created_at":"2024-08-01T21:02:12.506Z","updated_at":"2026-01-18T00:20:12.906Z","avatar_url":"https://github.com/hadronized.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/phaazon/luminance-rs/blob/master/docs/imgs/luminance.svg\" alt=\"luminance logo\"/\u003e\u003c/p\u003e\n\u003ch1 align=\"right\"\u003e\u003cb\u003eluminance\u003c/b\u003e, the safe, type-driven, multi-backend \u003ci\u003eand simple\u003c/i\u003e graphics crate\u003c/h1\u003e\n\n![Build Status](https://github.com/phaazon/luminance-rs/actions/workflows/ci.yaml/badge.svg)]\n[![docs.rs](https://docs.rs/luminance/badge.svg)](https://docs.rs/luminance/)\n[![crates.io](https://img.shields.io/crates/v/luminance.svg?logo=rust)](https://crates.io/crates/luminance)\n![License](https://img.shields.io/crates/l/luminance)\n[![Matrix room](https://img.shields.io/matrix/luminance:matrix.org?color=%239b6dff)](https://matrix.to/#/#luminance:matrix.org)\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [History](#history)\n* [The luminance ecosystem](#the-luminance-ecosystem)\n  * [Core crates](#core-crates)\n  * [Backend crates](#backend-crates)\n  * [Platform crates](#platform-crates)\n  * [Other crates](#other-crates)\n* [Learning](#learning)\n* [Contributing](#contributing)\n* [Dependent projects](#dependent-projects)\n* [Licenses](#licenses)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n# History\n\n**luminance** is an effort to make graphics rendering simple and elegant. It was originally imagined,\ndesigned and implemented by [@phaazon](https://github.com/phaazon) in Haskell ([here](https://hackage.haskell.org/package/luminance))\nand eventually ported to Rust in 2016. The core concepts remained the same and the crate has been\nslowly evolving ever since. At first, used only by @phaazon for his Rust demoscene productions\n(example [here](https://github.com/phaazon/celeri-remoulade) and\n[here](https://github.com/phaazon/outline-2017-invitro), using\n[spectra](https://crates.io/crates/spectra)) and a bunch of curious peeps, it now has more visibility\namong the graphics ecosystem of Rust.\n\nCurrently, that ecosystem is spread into several crates, ideas and people. It is highly\nrecommended to read the great article about the ecosystem by @Icefoxen, [here](https://wiki.alopex.li/AGuideToRustGraphicsLibraries2019).\n\nHowever, **luminance** is a bit different from what it was initially imagined for. People are\nlooking for an easy-to-use crate, with good abstractions and safe-guards against all the _bad_ and\n_dangerous_ graphics API caveats. **luminance** has always been about providing a safe, type-safe\nand elegant API (being Haskell-based makes it heavily use the type system, for instance) but it now\nhas a more unique niche in the ecosystem. Where [gfx-hal] provides an experience focused\non down-to-metal performance and an API very similar to [Vulkan]’s, **luminance** provides an API\nthat is, for sure, a bit higher-level, and not [Vulkan]-based — and hence, yes, it likely won't give\nyou the same performances as with [gfx-hal] (though no benchmarks have been done so far) — but\neasier to start with, especially if you don’t already have a background experience with [OpenGL] or [Vulkan].\n\nThe strengths of **luminance** are:\n\n- Easy to learn: the concepts, based on [OpenGL], are applied to _graphics_, not _general-purpose\n  programming on GPU_. Using **luminance** will help you wrap your fingers around what graphics\n  programming is about and it will help you, perhaps, to jump to lower abstractions like\n  [gfx-hal], if you ever need to.\n- Performant: by using Rust and being designed around the concept of good performances,\n  **luminance** should allow you to build nice and fast simulations, animations and video games.\n  Remember that games you played years ago didn’t have [Vulkan] and were impressive nonetheless.\n  It’s unlikely you will get 100% out of your GPU by using **luminance** since it’s built over\n  technologies that are not using 100% of your GPU. Unless you need and know exactly why you need\n  100% of your GPU, you should be _just fine™_.\n- Elegant: the design is heavily based on functional programming concepts such as typeclasses,\n  associated types, singleton types, existentials, contravariant resources, procedural macros,\n  strong typing, etc. Plus, every bit of possible _stateful_ computations is hidden behind a\n  system of smart state, removing the need to worry about side-effects. **luminance** still has\n  mutation (unless its Haskell version) but the Rust type system and borrow checker allows for\n  safe mutations.\n- Modern: the whole **luminance** ecosystem tries its best to stay up-to-date with Rust evolutions\n  and features. On the same level, the underlying technologies are kept up-to-date and might even\n  be replaced if modern, better-suited alternatives emerge (similarly, [Vulkan] support might\n  eventually get added, though there are no immediate plans to do so).\n- _Opinionated enough_: a big bet with **luminance** was to make it opinionated, but not too much.\n  It needs to be opinionated to allow for some design constructs to be possible, optimize\n  performance and allow for extra safety. However, it must not be _too_ opinionated, lest it become\n  a _framework_. **luminance** is a _library_, not a _framework_, meaning that it will adapt to\n  how **you** think you should design your software, not the other way around (within the limits of\n  safe design). **luminance** won't tie your hands.\n\n# The luminance ecosystem\n\nIt is currently composed of several different crates:\n\n## Core crates\n\n- [luminance]: the core crate, exposing a graphics API that aims to be easy to learn, safe,\n  type-safe, stateless and fun!\n- [luminance-derive]: a companion crate to [luminance] you’re very likely to enjoy; it will help\n  you derive important traits for your application or library to work. You should definitely\n  invest some time in the documentation of this crate; it’s easy and well explained.\n- [luminance-front]: a _front facing_ set of [luminance] re-exports to make it easy to use the\n  library as a end-user developer by picking a backend type at compile-time, most of the time\n  based on your compilation target.\n\n## Backend crates\n\n- [luminance-gl]: a crate gathering OpenGL backends. Several versions might be supported.\n- [luminance-webgl]: a crate gathering WebGL backends. Several versions might be supported.\n\n## Platform crates\n\n- [luminance-glfw]: a platform implementation for [GLFW](https://www.glfw.org)\n  (via [glfw](https://crates.io/crates/glfw)).\n- [luminance-glutin]: a platform implementation for [glutin].\n- [luminance-sdl2]: a platform implementation for [sdl2].\n- [luminance-web-sys]: a platform implementation for [web-sys].\n\n## Other crates\n\n- [luminance-std140]: a crate useful to _backend crates_ based on Khronos / OpenGL’s `std140`.\n- [examples]: a combination of examples to show off some features / techniques.\n\n# Learning\n\n[luminance] has two main and official resources to learn:\n\n- The [book](https://phaazon.github.io/learn-luminance). It contains various chapters,\n  including tutorials and onboarding newcomers. It will not provide you with the best description\n  of a given feature as it focuses more on the overall comprehension and explaining than code\n  directly. It also fits people who don’t know anything about rendering.\n- The [examples]. They are like unit tests: each introduces and focuses on a very specific aspect\n  or feature. You should read them if you are interested in a specific feature. They’re not well\n  suited to learn from scratch and they are weaker than a structured tutorial but more concise.\n  They also provide _functional tests_ as the backend-agnostic architecture allow to very easily add\n  new tests.\n\nYou should try both ways and see which one fits the best for you!\n\n# Contributing\n\nPlease read the [CONTRIBUTING](CONTRIBUTING.md) document.\n\n# Dependent projects\n\nThose projects use luminance:\n\n- [Céleri Rémoulade](https://github.com/phaazon/celeri-remoulade).\n  - A demoscene production by [@phaazon](https://github.com/phaazon), released at Evoke 2016 in the\n    PC Demo category.\n- [Outline 2017 Invitro](https://github.com/phaazon/outline-2017-invitro).\n  - A demoscene production by [@phaazon](https://github.com/phaazon),\n  released at Revision 2017 in the PC Demo category.\n- [Dali Renderer](https://github.com/austinjones/dali-rs)\n  - A rendering library by [@austinjones](https://github.com/austinjones), designed to generate\n    high-resolution digital paintings to be printed on canvas.\n- [Rx](https://rx.cloudhead.io)\n  - A modern and minimalist pixel editor. Rx's GL backend is built on luminance.\n- [luminance-glyph](https://github.com/JohnDoneth/luminance-glyph)\n  - A fast text renderer for luminance by [@JohnDoneth](https://github.com/JohnDoneth), powered by\n    [glyph_brush](https://crates.io/crates/glyph_brush).\n- [EverFight](https://github.com/SnoozeTime/spacegame)\n  - A game made by [@SnoozeTime](https://github.com/SnoozeTime) for a game jam; rendering done with luminance (sprites,\n    text and UI).\n- [Bevy Retro](https://github.com/katharostech/bevy_retro)\n  - A Bevy plugin by [@katharostech](https://github.com/katharostech) for building 2D, pixel-perfect games that run seamlessly on desktop or in the browser.\n\n# Licenses\n\n[luminance] is licensed under [BSD-3-Clause] and the logo is under [CC BY-ND].\n\n[luminance]: ./luminance\n[luminance-derive]: ./luminance-derive\n[luminance-gl]: ./luminance-gl\n[luminance-glfw]: ./luminance-glfw\n[luminance-glutin]: ./luminance-glutin\n[luminance-sdl2]: ./luminance-sdl2\n[luminance-webgl]: ./luminance-webgl\n[luminance-web-sys]: ./luminance-web-sys\n[luminance-front]: ./luminance-front\n[luminance-std140]: ./luminance-std140\n[examples]: ./examples\n[glutin]: https://crates.io/crates/glutin\n[gfx-hal]: https://crates.io/crates/gfx-hal\n[sdl2]: https://crates.io/crates/sdl2\n[web-sys]: https://crates.io/crates/web-sys\n[Vulkan]: https://www.khronos.org/vulkan\n[Opengl]: https://www.khronos.org/opengl\n[BSD-3-Clause]: https://opensource.org/licenses/BSD-3-Clause\n[CC BY-ND]: https://creativecommons.org/licenses/by-nd/4.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadronized%2Fluminance-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadronized%2Fluminance-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadronized%2Fluminance-rs/lists"}