55 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
66 */
77
8- mod registry;
9- mod storage;
10-
8+ // Note that a lot of those are public, but the godot crate still has the final say on what it wants to re-export.
9+ // Doing fine-grained visibility restrictions on every level is a useless maintenance chore.
1110pub mod builder;
1211pub mod builtin;
1312pub mod classes;
1413pub mod global;
1514pub mod init;
1615pub mod obj;
16+ pub mod registry;
17+ pub mod tools;
1718
18- #[ deprecated = "Print macros have been moved to `godot::global`." ]
19- pub mod log {
20- pub use crate :: global:: {
21- godot_error, godot_print, godot_print_rich, godot_script_error, godot_warn,
22- } ;
23- }
24-
25- #[ doc( hidden) ]
26- #[ path = "deprecated.rs" ]
27- pub mod __deprecated;
28- #[ doc( hidden) ]
29- pub mod private;
30-
19+ mod storage;
3120pub use godot_ffi as sys;
32- #[ doc( hidden) ]
33- pub use godot_ffi:: out;
34- pub use registry:: * ;
35- pub mod engine;
3621
37- /// Higher-level additions to the Godot engine API.
38- ///
39- /// Contains functionality that extends existing Godot classes and functions, to make them more versatile
40- /// or better integrated with Rust.
41- pub mod tools;
22+ // ----------------------------------------------------------------------------------------------------------------------------------------------
23+ // Generated code
4224
4325// Output of generated code. Mimics the file structure, symbols are re-exported.
4426#[ rustfmt:: skip]
@@ -52,6 +34,9 @@ mod gen {
5234 include ! ( concat!( env!( "OUT_DIR" ) , "/mod.rs" ) ) ;
5335}
5436
37+ // ----------------------------------------------------------------------------------------------------------------------------------------------
38+ // API version check
39+
5540macro_rules! generate_gdextension_api_version {
5641 (
5742 $(
@@ -89,3 +74,32 @@ generate_gdextension_api_version!(
8974 "4.1" ,
9075 } ,
9176) ;
77+
78+ // ----------------------------------------------------------------------------------------------------------------------------------------------
79+ // Hidden but accessible symbols
80+
81+ /// Module which is used for deprecated warnings. It stays even if there is nothing currently deprecated.
82+ #[ doc( hidden) ]
83+ #[ path = "deprecated.rs" ]
84+ pub mod __deprecated;
85+
86+ /// All internal machinery that is accessed by various gdext tools (e.g. proc macros).
87+ #[ doc( hidden) ]
88+ pub mod private;
89+
90+ /// Re-export logging macro.
91+ #[ doc( hidden) ]
92+ pub use godot_ffi:: out;
93+
94+ // ----------------------------------------------------------------------------------------------------------------------------------------------
95+ // Deprecated modules
96+
97+ #[ deprecated = "Module has been split into `godot::classes`, `godot::global` and `godot::tools`." ]
98+ pub mod engine;
99+
100+ #[ deprecated = "Print macros have been moved to `godot::global`." ]
101+ pub mod log {
102+ pub use crate :: global:: {
103+ godot_error, godot_print, godot_print_rich, godot_script_error, godot_warn,
104+ } ;
105+ }
0 commit comments