We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c751936 commit 3f139ddCopy full SHA for 3f139dd
1 file changed
crates/opencli-rs-discovery/build.rs
@@ -24,9 +24,11 @@ fn main() {
24
25
let mut code = String::from("pub const BUILTIN_ADAPTERS: &[(&str, &str)] = &[\n");
26
for (rel_path, abs_path) in &entries {
27
+ // Normalize path separators to forward slash for cross-platform compatibility.
28
+ // Windows uses backslash which Rust interprets as escape sequences in string literals.
29
code.push_str(&format!(
30
" (\"{}\", include_str!(\"{}\")),\n",
- rel_path,
31
+ rel_path.replace('\\', "/"),
32
abs_path.replace('\\', "/")
33
));
34
}
0 commit comments