mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Ignore wasm_gc for debug build. (#6962)
* Ignore gc for debug build. * alternate implementation * Update utils/wasm-builder/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * fix Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -168,17 +168,29 @@ pub fn build_project_with_default_rustflags(
|
||||
default_rustflags,
|
||||
);
|
||||
|
||||
let (wasm_binary, wasm_binary_bloaty) = if let Some(wasm_binary) = wasm_binary {
|
||||
(
|
||||
wasm_binary.wasm_binary_path_escaped(),
|
||||
bloaty.wasm_binary_bloaty_path_escaped(),
|
||||
)
|
||||
} else {
|
||||
(
|
||||
bloaty.wasm_binary_bloaty_path_escaped(),
|
||||
bloaty.wasm_binary_bloaty_path_escaped(),
|
||||
)
|
||||
};
|
||||
|
||||
write_file_if_changed(
|
||||
file_name.into(),
|
||||
format!(
|
||||
r#"
|
||||
pub const WASM_BINARY: Option<&[u8]> = Some(include_bytes!("{wasm_binary}"));
|
||||
pub const WASM_BINARY_BLOATY: Option<&[u8]> = Some(include_bytes!("{wasm_binary_bloaty}"));
|
||||
"#,
|
||||
wasm_binary = wasm_binary.wasm_binary_path_escaped(),
|
||||
wasm_binary_bloaty = bloaty.wasm_binary_bloaty_path_escaped(),
|
||||
),
|
||||
);
|
||||
file_name.into(),
|
||||
format!(
|
||||
r#"
|
||||
pub const WASM_BINARY: Option<&[u8]> = Some(include_bytes!("{wasm_binary}"));
|
||||
pub const WASM_BINARY_BLOATY: Option<&[u8]> = Some(include_bytes!("{wasm_binary_bloaty}"));
|
||||
"#,
|
||||
wasm_binary = wasm_binary,
|
||||
wasm_binary_bloaty = wasm_binary_bloaty,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Checks if the build of the WASM binary should be skipped.
|
||||
|
||||
Reference in New Issue
Block a user