Skip to content

Commit e8f25ee

Browse files
committed
Improve Cargo feature docs
1 parent 9cca3e0 commit e8f25ee

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

godot/src/lib.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@
106106
//!
107107
//! The following features can be enabled for this crate. All off them are off by default.
108108
//!
109-
//! * **`formatted`**
110-
//!
111-
//! Format the generated bindings with `rustfmt`. This significantly increases initial compile times and is
112-
//! mostly useful when you actively contribute to the library and/or want to inspect generated files.<br><br>
113-
//!
114109
//! * **`double-precision`**
115110
//!
116111
//! Use `f64` instead of `f32` for the floating-point type [`real`][type@builtin::real]. Requires Godot to be compiled with the
@@ -131,32 +126,38 @@
131126
//!
132127
//! * **`serde`**
133128
//!
134-
//! Implement the [serde](https://docs.rs/serde) traits `Serialize` and `Deserialize` traits for certain built-in types.
129+
//! Implement the [serde](https://serde.rs/) traits `Serialize` and `Deserialize` traits for certain built-in types.
135130
//! The serialized representation underlies **no stability guarantees** and may change at any time, even without a SemVer-breaking change.
136131
//! <br><br>
137132
//!
133+
//! * **`lazy-function-tables`**
134+
//!
135+
//! Instead of loading all engine function pointers at startup, load them lazily on first use. This reduces startup time and RAM usage, but
136+
//! incurs additional overhead in each FFI call. Also, you lose the guarantee that once the library has booted, all function pointers are
137+
//! truly available. Function calls may thus panic only at runtime, possibly in deeply nested code paths.
138+
//! This feature is not yet thread-safe and can thus not be combined with `experimental-threads`.<br><br>
139+
//!
140+
//! * **`formatted`**
141+
//!
142+
//! Format the generated binding code with a custom-built formatter, which aims to strike a balance between runtime and human readability.
143+
//! rustfmt generates nice output, but it is unfortunately excessively slow across hundreds of Godot classes.<br><br>
144+
//!
138145
//! * **`experimental-threads`**
139146
//!
140147
//! Experimental threading support. This enables `Send`/`Sync` traits for `Gd<T>` and makes the guard types `Gd`/`GdMut` aware of
141148
//! multi-threaded references. There safety aspects are not ironed out yet; there is a high risk of unsoundness at the moment.
142-
//! As this evolves, it is very likely that the API becomes more strict.
149+
//! As this evolves, it is very likely that the API becomes more strict.<br><br>
143150
//!
144151
//! * **`experimental-godot-api`**
145152
//!
146153
//! Access to `godot::engine` APIs that Godot marks "experimental". These are under heavy development and may change at any time.
147-
//! If you opt in to this feature, expect breaking changes at compile and runtime.
154+
//! If you opt in to this feature, expect breaking changes at compile and runtime.<br><br>
148155
//!
149156
//! * **`experimental-wasm`**
150157
//!
151158
//! Support for WebAssembly exports is still a work-in-progress and is not yet well tested. This feature is in place for users
152-
//! to explicitly opt-in to any instabilities or rough edges that may result.
153-
//!
154-
//! * **`lazy-function-tables`**
155-
//!
156-
//! Instead of loading all engine function pointers at startup, load them lazily on first use. This reduces startup time and RAM usage, but
157-
//! incurs additional overhead in each FFI call. Also, you lose the guarantee that once the library has booted, all function pointers are
158-
//! truly available. Function calls may thus panic only at runtime, possibly in deeply nested code paths.
159-
//! This feature is not yet thread-safe and can thus not be combined with `experimental-threads`.
159+
//! to explicitly opt-in to any instabilities or rough edges that may result. Due to a limitation in Godot, it might currently not
160+
//! work Firefox browser.<br><br>
160161
//!
161162
//! # Public API
162163
//!

0 commit comments

Comments
 (0)