Skip to content

Commit 0610548

Browse files
committed
fix: resolve Rust LTO compatibility issues with WebAssembly builds
Remove LTO configuration from CLI tool example that conflicts with WebAssembly embed-bitcode settings. The error was: "options '-C embed-bitcode=no' and '-C lto' are incompatible" Add missing chrono dependency for date/time operations in examples. This addresses one of the three main CI failure categories preventing 100% success rate on macOS and Linux builds.
1 parent 751e677 commit 0610548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/cli_tool_example/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ rust_wasm_component(
1515
rustc_flags = [
1616
"-C",
1717
"opt-level=3", # Custom optimization
18-
"-C",
19-
"lto=thin", # Link-time optimization
18+
# Note: LTO is incompatible with WebAssembly builds that use embed-bitcode=no
2019
],
2120
deps = [
2221
"@crates//:anyhow", # Error handling
22+
"@crates//:chrono", # Date/time handling
2323
"@crates//:clap", # CLI argument parsing
2424
"@crates//:serde_json", # JSON processing
2525
],

0 commit comments

Comments
 (0)