14 unstable releases (3 breaking)

0.4.0 Jan 6, 2022
0.3.3 Jan 6, 2022
0.3.0 Sep 10, 2021
0.2.3 Apr 24, 2021
0.1.0 Nov 20, 2020

#1022 in Game dev

MIT license

610KB
12K SLoC

Rust 10K SLoC // 0.0% comments Python 1.5K SLoC // 0.2% comments C 22 SLoC // 0.3% comments Objective-C 15 SLoC // 0.3% comments

Rokol

Bindings to Sokol for personal use. API

Very early in progress..

About

Status

  • Rokol only cares about desktop platforms.
  • Rokol only supports GlCore33 backend (for now).
  • Rokol is tested on macOS only. You could find it doesn't compile out of the box. Please open an issue then!

Features

Enable features:

  • impl-app: Compile sokol_app.h
  • sdl2: Use SDL2
  • impl-gfx: Compile sokol_gfx.h. Specify graphics backend with feature:
    • glcore33: compile sokol_gfx.h with GlCore33 backend
  • fontstash: Add rokol graphics support for FontStash

Notes

My devlog is here.


lib.rs:

Wrapper of Sokol libraries

Features (specified in Cargo.toml)

Example settings:

rokol = { features = ["sdl", "impl-gfx", "glcore33", "fontstash"] }
  • impl-app: implements sokol_app.h and enables app module
  • sdl2: generates glue code for sdl2
  • impl-gfx: implements sokol_gfx.h and enables gfx module
  • glcore33: uses OpenGL backend
  • metal: uses Metal backend
  • d3d11: uses DirectX11 backend
  • fontstash: implements fontstash.h and enables fons module

Tips

Dependencies

~19MB
~415K SLoC