22
22
//!
23
23
//! The `api` module contains high-level wrappers for all the API types generated from a
24
24
//! JSON description of the API. The generated types are tied to a specific version, which
25
- //! is currently `3.2.3-stable` for the crates.io version. If you want to use the bindings
26
- //! with another version of the engine, see the instructions [here][custom-version] on
27
- //! generating custom bindings.
25
+ //! is currently `3.2.3-stable` for the crates.io version. If you want to use the bindings with
26
+ //! another version of the engine, read the notes on the `custom-godot` feature flag below.
28
27
//!
29
28
//! ### Memory management
30
29
//!
40
39
//! on `Ref`.
41
40
//!
42
41
//! ## Feature flags
43
- //! Functionality toggles:
44
- //! * `async` -- *disabled* by default. Enables asyn functionality, see [`tasks`] module for details.
45
- //! * `serde` -- *disabled* by default. Enable for `serde` support. See also
46
- //! [`Variant`](core_types::Variant).
47
- //!
48
- //! Affecting bindings generation:
49
- //! * `bindings` -- *enabled* by default. Includes the crates.io version of the bindings in the
50
- //! `api` module. Disable if you want to use a custom Godot version.
51
- //! * `custom-godot` -- *disabled* by default. When active, looks for a `GODOT_BIN` environment
52
- //! variable pointing to the Godot executable, or a `godot` executable in the path.
53
- //! * `formatted` -- *disabled* by default. Enable if the generated binding source code should
54
- //! be human-readable.
42
+ //! All features are disabled by default.
43
+ //!
44
+ //! Functionality toggles:
45
+ //!
46
+ //! * **`async`**<br>
47
+ //! Activates async functionality, see [`tasks`] module for details.
48
+ //!
49
+ //! * **`serde`**<br>
50
+ //! Enable for `serde` support of several core types. See also [`Variant`](core_types::Variant).
51
+ //!
52
+ //! Bindings generation:
53
+ //!
54
+ //! * **`custom-godot`**<br>
55
+ //! When active, tries to locate a Godot executable on your system, in this order:
56
+ //! 1. If a `GODOT_BIN` environment variable is defined, it will interpret it as a path to the binary
57
+ //! (not directory).
58
+ //! 2. An executable called `godot`, accessible in your system's PATH, is used.
59
+ //! 3. If neither of the above is found, an error is generated.
60
+ //!
61
+ //! The symbols in [`api`] will be generated in a way compatible with that engine version.
62
+ //! This allows to use Godot versions older than the currently supported ones. Note that there
63
+ //! are some bugs for Godot versions prior to 3.3.1.
64
+ //!
65
+ //! See [Custom Godot builds][custom-godot] for detailed instructions.
66
+ //!
67
+ //! * **`formatted`**<br>
68
+ //! Enable if the generated binding source code should be human-readable and split
69
+ //! into multiple files. This can also help IDEs that struggle with a single huge file.
55
70
//!
56
71
//! [thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html
57
- //! [custom-version]: https://github.com/godot-rust/godot-rust/#other-versions-or-custom-builds
72
+ //! [custom-godot]: https://godot-rust.github.io/book/advanced-guides/custom-godot.html
73
+ //!
58
74
//!
59
75
60
76
// TODO: add logo using #![doc(html_logo_url = "https://<url>")]
@@ -79,10 +95,8 @@ pub mod prelude;
79
95
80
96
/// Bindings for the Godot Class API.
81
97
#[ doc( inline) ]
82
- #[ cfg( feature = "bindings" ) ]
83
98
pub use gdnative_bindings as api;
84
99
85
- /// Support for async code
86
100
#[ doc( inline) ]
87
101
#[ cfg( feature = "async" ) ]
88
102
pub use gdnative_async as tasks;
0 commit comments