1
+ #![ cfg_attr( published_docs, feature( doc_cfg) ) ]
1
2
/*
2
3
* Copyright (c) godot-rust; Bromeon and contributors.
3
4
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -42,10 +43,10 @@ pub struct GodotVersion {
42
43
// Custom mode: Regenerate all files
43
44
44
45
// This file is explicitly included in unit tests. Needs regex dependency.
45
- #[ cfg( test) ]
46
+ #[ cfg( test) ] # [ cfg_attr ( published_docs , doc ( cfg ( test ) ) ) ]
46
47
mod godot_version;
47
48
48
- #[ cfg( feature = "api-custom" ) ]
49
+ #[ cfg( feature = "api-custom" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom" ) ) ) ]
49
50
#[ path = "" ]
50
51
mod depend_on_custom {
51
52
use super :: * ;
@@ -63,7 +64,7 @@ mod depend_on_custom {
63
64
godot_exe:: write_gdextension_headers ( h_path, rs_path, false , watch) ;
64
65
}
65
66
66
- #[ cfg( feature = "api-custom-extheader" ) ]
67
+ #[ cfg( feature = "api-custom-extheader" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-extheader" ) ) ) ]
67
68
pub fn write_gdextension_headers_from_c ( h_path : & Path , rs_path : & Path , watch : & mut StopWatch ) {
68
69
godot_exe:: write_gdextension_headers ( h_path, rs_path, true , watch) ;
69
70
}
@@ -73,13 +74,13 @@ mod depend_on_custom {
73
74
}
74
75
}
75
76
76
- #[ cfg( feature = "api-custom" ) ]
77
+ #[ cfg( feature = "api-custom" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom" ) ) ) ]
77
78
pub use depend_on_custom:: * ;
78
79
79
80
// ----------------------------------------------------------------------------------------------------------------------------------------------
80
81
// Custom mode: Generate all files based on user provided JSON.
81
82
82
- #[ cfg( feature = "api-custom-json" ) ]
83
+ #[ cfg( feature = "api-custom-json" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-json" ) ) ) ]
83
84
#[ path = "" ]
84
85
mod depend_on_custom_json {
85
86
use super :: * ;
@@ -105,13 +106,13 @@ mod depend_on_custom_json {
105
106
}
106
107
}
107
108
108
- #[ cfg( feature = "api-custom-json" ) ]
109
+ #[ cfg( feature = "api-custom-json" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-json" ) ) ) ]
109
110
pub use depend_on_custom_json:: * ;
110
111
111
112
// ----------------------------------------------------------------------------------------------------------------------------------------------
112
113
// Prebuilt mode: Reuse existing files
113
114
114
- #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ]
115
+ #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ] # [ cfg_attr ( published_docs , doc ( cfg ( not ( any ( feature = "api-custom" , feature = "api-custom-json" ) ) ) ) ) ]
115
116
#[ path = "" ]
116
117
mod depend_on_prebuilt {
117
118
use super :: * ;
@@ -153,7 +154,7 @@ mod depend_on_prebuilt {
153
154
}
154
155
}
155
156
156
- #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ]
157
+ #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ] # [ cfg_attr ( published_docs , doc ( cfg ( not ( any ( feature = "api-custom" , feature = "api-custom-json" ) ) ) ) ) ]
157
158
pub use depend_on_prebuilt:: * ;
158
159
159
160
// ----------------------------------------------------------------------------------------------------------------------------------------------
@@ -217,7 +218,7 @@ pub fn emit_wasm_nothreads_cfg() {
217
218
218
219
// The environment variable for target family has a list of applicable families separated by commas.
219
220
// For Emscripten in particular, this can be "unix,wasm". Therefore, to check for the Wasm target, we must check each item in the list.
220
- #[ cfg( feature = "experimental-wasm-nothreads" ) ]
221
+ #[ cfg( feature = "experimental-wasm-nothreads" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "experimental-wasm-nothreads" ) ) ) ]
221
222
if std:: env:: var ( "CARGO_CFG_TARGET_FAMILY" )
222
223
. expect ( "target family environment variable" )
223
224
. split ( ',' )
0 commit comments