forked from godot-rust/gdext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
211: Prebuilt Godot artifacts r=Bromeon a=Bromeon Closes godot-rust#12 Closes godot-rust#107 From now on, gdext by default fetches pre-generated versions of these files, published in the [`godot4-prebuilt`](https://github.com/godot-rust/godot4-prebuilt) repo: * `extension_api.json` (from Godot binary) * `gdextension_interface.h` (from Godot binary) * `gdextension_interface.rs` (through bindgen -- currently supports 3 platforms) This has several benefits: 1. Significantly fewer dependencies, as bindgen is no longer needed, and thus smaller compile times. 2. Most CI jobs no longer need the Godot binary (clippy, test), speeding up CI _in addition_ to (1). 3. It's possible to change the Godot API behind gdext without manually rebuilding the artifacts. 4. Easy comparison between the Godot APIs of different released versions. ### Using a custom Godot binary It is still possible to generate those files locally like before, through the use of the `custom-godot` feature on the `godot` crate. This is necessary for any platform/configuration different from the 3 main supported ones (because bindgen generates different Rust bindings), as well as any in-development or modified Godot versions. ### Changing the Godot release By default, the latest Godot release is used as input to gdext. Switching between different Godot versions is easily possible, although a bit cumbersome. If you want to use an older version `4.0`, add this to your **workspace** (not sub-crate) `Cargo.toml`: ```toml # We need to trick Cargo into seeing a different URL; rust-lang/cargo#5478 [patch."https://github.com/godot-rust/godot4-prebuilt"] godot4-prebuilt = { git = "https://github.com//godot-rust/godot4-prebuilt", branch = "4.0"} ``` We're looking into ways to simplify this. In a crates.io release (godot-rust#2), we would need to rethink this anyway, mapping Godot versions to Rust release versions (which is not trivial). Co-authored-by: Jan Haller <[email protected]>
- Loading branch information
Showing
28 changed files
with
656 additions
and
1,088 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.