5 releases

Uses new Rust 2024

0.1.7 May 16, 2025
0.1.6 May 4, 2025

#293 in Graphics APIs

Download history 533/week @ 2025-04-30 31/week @ 2025-05-07 122/week @ 2025-05-14

686 downloads per month

MIT license

265KB
2K SLoC

C 1K SLoC // 0.0% comments Rust 444 SLoC C++ 253 SLoC // 0.0% comments

sky_renderer

sky_renderer is a minimalistic 2D rendering engine built in Rust with native bindings to OpenGL. This version only provides low-level bindings to OpenGL and is not yet production-ready. Future versions will add support for additional drawing primitives such as lines, shapes, and texts as well as a higher-level rendering API on top of OpenGL.

🚧 Status

This is a (very) early release: this version provides a limited set of bindings to OpenGL and is not yet suitable for production use. The bindings can nonetheless be used in your own code if you wish to experiment with a minimalistic API to OpenGL. If a specific binding for your use-case is missing, please let me know.

🐞 Issues

You can raise issues directly on Github.

🔧 Installation

Linux

Make sure you have all dependencies installed on your system (including a C/C++ compiler and CMake):

sudo apt-get install libgl1-mesa-dev
sudo apt install mesa-utils
sudo apt install libglfw3-dev

You can simply add sky_renderer as a dependency to your project. When building your project, cargo will first trigger a C/C++ build (using CMake) of a static library containing the sky_renderer ffi bindings to OpenGL. The entire process should be totally transparent to your project.

Windows

Make sure you are are using release 0.1.7 or later (there was no Windows support for earlier versions). Ensure you have Visual C/C++ and CMake installed on your system. Also use vcpkg to install glfw on your system:

git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install glfw3

You must also update your system's environment variables:

  • Define the VCPKG_LIB_PATH environment variable to point to vcpkg's lib folder (this is where glfw3.lib is installed, for example D:\GitHub\vcpkg\installed\x64-windows\lib)

  • Update your system's PATH environment variable to point to vcpkg's bin folder (this is where glfw3.dll is installed, for example D:\GitHub\vcpkg\installed\x64-windows\bin)

macOS

Ensure you have CMake and a C/C++ compiler installed on your system. Use Homebrew to install glfw on your system:

brew install glfw
brew info glfw

Once glfw is installed, the crate's build script will look for the glfw libraries under /opt/homebrew/lib

📖 Docs

Refer to the sky_renderer GitHub wiki, which will be updated soon.

📦 Examples

Refer to the examples provided in the sky_renderer GitHub repository. These will be updated as new features are added.

Dependencies

~5MB
~144K SLoC