Skip to content

feat(GodotRust)!: Add godot-rust project support#24

Open
DragonAxe wants to merge 26 commits intobytemeadow:mainfrom
DragonAxe:dx/godot-rust-project-support
Open

feat(GodotRust)!: Add godot-rust project support#24
DragonAxe wants to merge 26 commits intobytemeadow:mainfrom
DragonAxe:dx/godot-rust-project-support

Conversation

@DragonAxe
Copy link
Collaborator

  • Added GDExtension file generation.
        + Includes cargo support for locating cargo target directory.
        + Added [gdextension.<name>.GodotBevy] section to gdenv.toml. Supports generating multiple gdextension files at once to support multiple native extensions.
        + Support for additional gdextension generators can be added by adding new cases to SpecGdExtensionGenerator enum.

  • Moved godot runner code into GodotRunner API:
        + Formalized runner API for use in cargo run scripts (run_godot.rs).
        + Runner is now testable with the help of command_runner.rs.
        + Added pre_import field to gdenv.toml to generate .godot directory for newly cloned projects.

  • Fixed bug in installer.rs. install_version_from_archive return value did not return a path to the godot executable.

  • 67% of all lines now have test coverage!
        + 81% for gdenv-lib.
        + <1% for gdenv.

- Added GDExtension file generation.
    + Includes cargo support for locating cargo target directory.
    + Added `[gdextension.<name>.GodotBevy]` section to gdenv.toml. Supports generating multiple gdextension files at once to support multiple native extensions.
    + Support for additional gdextension generators can be added by adding new cases to SpecGdExtensionGenerator enum.
- Moved godot runner code into GodotRunner API:
    + Formalized runner API for use in cargo run scripts (run_godot.rs).
    + Runner is now testable with the help of command_runner.rs.
    + Added `pre_import` field to gdenv.toml to generate `.godot` directory for newly cloned projects.
- Fixed bug in installer.rs. `install_version_from_archive` return value did not return a path to the godot executable.

- 67% of all lines now have test coverage!
    + 81% for gdenv-lib.
    + <1% for gdenv.
@DragonAxe DragonAxe requested a review from dcvz March 2, 2026 06:34
- Fetch `crate_name` from cargo_metadata instead of asking user.
- Automatically append `Cargo.toml` to `cargo_manifest_path`.
- Rename `cargo_manifest_path` to `cargo_crate_path`.
@DragonAxe
Copy link
Collaborator Author

I also simplified the gdenv.toml gdextension configuration by removing the need for a crate_name field.

@DragonAxe
Copy link
Collaborator Author

I don't like how GodotRunner::build leaks the tokio dependency, requiring users of the library to use it. I'm looking for an alternate solution.

#[cfg(not(feature = "itest"))]
#[tokio::main]
async fn main() -> anyhow::Result<()> {
    gdenv_lib::api::godot_runner::GodotRunner::init()?
        .build().await?.execute()
}

@DragonAxe
Copy link
Collaborator Author

  • Updated the README.
  • Added gdenv schema command to generate documentation for a gdenv.toml file directly from rust-docs.

@DragonAxe
Copy link
Collaborator Author

I keep seeing this error in the Security Audit job:

Run dtolnay/rust-toolchain@stable
Run : parse toolchain version
Run : construct rustup command line
Run : set $CARGO_HOME
Run : install rustup if needed
info: downloading installer
error: could not amend shell profile: '/home/admin/.bash_profile': could not write rcfile file: '/home/admin/.bash_profile': Permission denied (os error 13)
Error: Process completed with exit code 1.

It goes away when I re-run the job. Seems like a Blaze server issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant