File tree 2 files changed +25
-11
lines changed
2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#![ cfg_attr( test, allow( unused) ) ]
18
18
19
+ // ----------------------------------------------------------------------------------------------------------------------------------------------
20
+ // Validations
21
+
22
+ // More validations in godot crate. #[cfg]s are checked in godot-core.
23
+
24
+ #[ cfg( all( feature = "codegen-lazy-fptrs" , feature = "experimental-threads" ) ) ]
25
+ compile_error ! (
26
+ "Cannot combine `lazy-function-tables` and `experimental-threads` features;\n \
27
+ thread safety for lazy-loaded function pointers is not yet implemented."
28
+ ) ;
29
+
30
+ #[ cfg( all(
31
+ feature = "experimental-wasm-nothreads" ,
32
+ feature = "experimental-threads"
33
+ ) ) ]
34
+ compile_error ! ( "Cannot use 'experimental-threads' with a nothreads Wasm build yet." ) ;
35
+
36
+ // ----------------------------------------------------------------------------------------------------------------------------------------------
37
+
19
38
// Output of generated code. Mimics the file structure, symbols are re-exported.
20
39
#[ rustfmt:: skip]
21
40
#[ allow(
Original file line number Diff line number Diff line change @@ -143,24 +143,19 @@ pub mod __docs;
143
143
// ----------------------------------------------------------------------------------------------------------------------------------------------
144
144
// Validations
145
145
146
- #[ cfg( all( feature = "lazy-function-tables" , feature = "experimental-threads" ) ) ]
147
- compile_error ! ( "Thread safety for lazy function pointers is not yet implemented." ) ;
148
-
149
- #[ cfg( all(
150
- feature = "experimental-wasm-nothreads" ,
151
- feature = "experimental-threads"
152
- ) ) ]
153
- compile_error ! ( "Cannot use 'experimental-threads' with a nothreads Wasm build yet." ) ;
146
+ // Many validations are moved to godot-ffi. #[cfg]s are not emitted in this crate, so move checks for those up to godot-core.
154
147
155
148
#[ cfg( all( target_family = "wasm" , not( feature = "experimental-wasm" ) ) ) ]
156
- compile_error ! ( "Must opt-in using `experimental-wasm` Cargo feature; keep in mind that this is work in progress" ) ;
149
+ compile_error ! (
150
+ "Wasm target requires opt-in via `experimental-wasm` Cargo feature;\n \
151
+ keep in mind that this is work in progress."
152
+ ) ;
157
153
158
154
// See also https://github.com/godotengine/godot/issues/86346.
155
+ // Could technically be moved to godot-codegen to reduce time-to-failure slightly, but would scatter validations even more.
159
156
#[ cfg( all( feature = "double-precision" , not( feature = "api-custom" ) ) ) ]
160
157
compile_error ! ( "The feature `double-precision` currently requires `api-custom` due to incompatibilities in the GDExtension API JSON." ) ;
161
158
162
- // Note: #[cfg]s are not emitted in this crate, so move checks for those up to godot-core.
163
-
164
159
// ----------------------------------------------------------------------------------------------------------------------------------------------
165
160
// Modules
166
161
You can’t perform that action at this time.
0 commit comments