GLFW3 bindings for Rust. Based on alegalle's rust_glfw bindings but heavily modified to work with the latest development versions of GLFW and Rust.
If you run into any problems, please let me know.
BUILD_SHARED_LIBS CMake option to true before you build and install it.$ git clone https://github.com/bjz/glfw3-rs.git, then $ cd glfw-rs.$ make. This will build the library to the ./lib directory.$ cd glfw/examples$ make or for a specific example $ make <example name> (eg. $ make window)You can add the bindings to your rustc command like so: $ rustc <filename> -L <path to glfw-rs directory>/lib.
In order to use glfw-rs it is essential that you run your main loop from the main OS thread using do task::task().sched_mode(task::PlatformThread).spawn { ... }. Unlike C or C++, Rust programs automatically start on a separate thread from the main OS loop, so if you forget to do this the windows and input events won't be able to update. You can see an example of how to set this up in the window example.
~B☼
$ claude mcp add glfw-rs \
-- python -m otcore.mcp_server <graph>