Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.38 KB

README.md

File metadata and controls

45 lines (38 loc) · 1.38 KB

This project uses the Rust GDExtension (https://godot-rust.github.io/) to accelerate compute‐shader <-> physics utilities in Godot 4.4.x. Before opening the project, make sure you have Rust and Cargo installed so that the extension can be built.

1. Install Rust & Cargo

Windows (winget)

winget install --id=Rustlang.Rustup -e

Linux (any distro)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

macOS (Homebrew)

brew install rustup
rustup-init
source "$HOME/.cargo/env"

2. Build the Rust GDExtension

  1. Change into the rust directory (IN THIS PROJECT, like the actual rust directory in this git repo):
    cd rust
  2. For a debug build (default):
    cargo build

The compiled dynamic library (.dll / .so / .dylib) will be placed in rust/target/{debug,release} and is automatically referenced by rust_bath.gdextension.

3. Open in Godot

  1. Launch Godot 4 (MUST BE IN FORWARD+, compatibility is not supported yet because of compute shaders)
  2. Open project.godot at the project root.
  3. The GDExtension will load the Rust library on startup.

4. Code Formatting

Before committing any changes, run this in the bath main project directory:

gdformat --use-spaces=4 .

This keeps GDScript files formatted consistently across the repo.