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 std:: borrow:: Cow ;
@@ -64,7 +65,7 @@ mod depend_on_custom {
64
65
godot_exe:: write_gdextension_headers ( h_path, rs_path, false , watch) ;
65
66
}
66
67
67
- #[ cfg( feature = "api-custom-extheader" ) ]
68
+ #[ cfg( feature = "api-custom-extheader" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-extheader" ) ) ) ]
68
69
pub fn write_gdextension_headers_from_c ( h_path : & Path , rs_path : & Path , watch : & mut StopWatch ) {
69
70
godot_exe:: write_gdextension_headers ( h_path, rs_path, true , watch) ;
70
71
}
@@ -74,13 +75,13 @@ mod depend_on_custom {
74
75
}
75
76
}
76
77
77
- #[ cfg( feature = "api-custom" ) ]
78
+ #[ cfg( feature = "api-custom" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom" ) ) ) ]
78
79
pub use depend_on_custom:: * ;
79
80
80
81
// ----------------------------------------------------------------------------------------------------------------------------------------------
81
82
// Custom mode: Generate all files based on user provided JSON.
82
83
83
- #[ cfg( feature = "api-custom-json" ) ]
84
+ #[ cfg( feature = "api-custom-json" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-json" ) ) ) ]
84
85
#[ path = "" ]
85
86
mod depend_on_custom_json {
86
87
use std:: borrow:: Cow ;
@@ -106,13 +107,13 @@ mod depend_on_custom_json {
106
107
}
107
108
}
108
109
109
- #[ cfg( feature = "api-custom-json" ) ]
110
+ #[ cfg( feature = "api-custom-json" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "api-custom-json" ) ) ) ]
110
111
pub use depend_on_custom_json:: * ;
111
112
112
113
// ----------------------------------------------------------------------------------------------------------------------------------------------
113
114
// Prebuilt mode: Reuse existing files
114
115
115
- #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ]
116
+ #[ 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" ) ) ) ) ) ]
116
117
#[ path = "" ]
117
118
mod depend_on_prebuilt {
118
119
use super :: * ;
@@ -154,7 +155,7 @@ mod depend_on_prebuilt {
154
155
}
155
156
}
156
157
157
- #[ cfg( not( any( feature = "api-custom" , feature = "api-custom-json" ) ) ) ]
158
+ #[ 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" ) ) ) ) ) ]
158
159
pub use depend_on_prebuilt:: * ;
159
160
160
161
// ----------------------------------------------------------------------------------------------------------------------------------------------
@@ -218,7 +219,7 @@ pub fn emit_wasm_nothreads_cfg() {
218
219
219
220
// The environment variable for target family has a list of applicable families separated by commas.
220
221
// For Emscripten in particular, this can be "unix,wasm". Therefore, to check for the Wasm target, we must check each item in the list.
221
- #[ cfg( feature = "experimental-wasm-nothreads" ) ]
222
+ #[ cfg( feature = "experimental-wasm-nothreads" ) ] # [ cfg_attr ( published_docs , doc ( cfg ( feature = "experimental-wasm-nothreads" ) ) ) ]
222
223
if std:: env:: var ( "CARGO_CFG_TARGET_FAMILY" )
223
224
. expect ( "target family environment variable" )
224
225
. split ( ',' )
0 commit comments