

Godot-rust is licensed under the MIT License. The /examples directory in the GitHub repo contains several ready to use examples, complete with Godot projects and setup for easy compilation from Cargo.
#Rust language full
For a full tutorial, check out "Getting Started" from the user guide! use gdnative::prelude::* While it is conceivable that one day people will be writing the latest 3D video games in Rust an area where high performance has historically been critical it is unlikely ever to have a web framework that will go toe-to-toe with Ruby on. The most general use case of the bindings will be to write Rust APIs that can be invoked from GDScript (so-called Native Classes).Īs is tradition, a simple "Hello World" should serve as an introduction. Rust is a low-level language, best suited for systems, embedded, and other performance critical code. For detailed workflow, check out the book.
#Rust language install
To create a GDNative library using godot-rust with Godot, install bindgen dependencies and include the dependency in a cdylib crate. Godot-rust supports all platforms where the Rust std and GDNative is available, including Windows, Mac, Linux, Android, and iOS. Traits are also used to express the class hierarchy within the Godot API, enabling static generic upcasts, and static prevention of impossible downcasts, even though there is no language-level inheritance in Rust. Godot-rust makes full use of Rust's trait system to build nice abstractions, and allow customization of low-level behavior without incurring extra run-time cost. They're also being constantly improved! Comprehensive trait system The bindings include procedural macros that automate away most of the GDNative boilerplate, from member registration to making sense of Variant structures, to timing functions in Godot's frame profiler.

Everything is entirely static and have no run-time cost in release mode. Accurate memory/thread safety modelīuilt on Rust generics, godot-rust feature a memory/thread safety model that closely matches the actual behavior of the engine, enabling users to build abstractions that push unsafe actions towards the interface, and guarantee safety in internal code. Designīeside exposing the full range of Godot APIs, the bindings are also designed to make life easier for Rust developers, while allowing detailed control over what is done at runtime.

The godot-rust project provides high-level Rust bindings to the Godot game engine.Ĭheck out the current minor version gdnative 0.10 on crates.io, or visit
