Cargo build and backslash embedded in path to rs file

Hi,

I have been working through gfx code and the vulkan site. I am getting an odd error all of sudden .

In a git-bash shell environment I execute cargo build:

cargo build
   Compiling vulkano-examples v0.1.0 (C:\users\fdemi\OneDrive\Documents\Development\vulkan\frank_projs\vulkano_lunarx_examples\examples)
error: couldn't read examples\init-instance/main.rs: The system cannot find the file specified. (os error 2)

The problem looks to be the backslash in examples\init-instance/main.rs

My vulkano_lunarx_examples\Cargo.toml contains

[workspace] 
members = [
    "examples"
]

In the examples\Cargo.toml

[package]
name = "vulkano-examples"
version = "0.1.0"
publish = false
workspace = ".."
edition = "2018"

[[bin]]
name = "init-instance"
path = "init-instance/main.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
vulkano = "0.20.0"
vulkano-win = "0.20.0"

winit = "0.24.0"

log = "0.4.14"

So the path examples\init-instance/main.rs is not handled well.
I used the gfx repository as example for structuring the relevant Cargo.toml files. Building gfx there is no problems. I looked at its environment to see what I maybe missing but I am stumped.

Any ideas??
Thanks,
Frank

(just to be clear, \ is backslash, / is forward slash)

That said, Git Bash seems to only accept Unix style paths (with /) whereas e.g. cmd.exe accepts both backslash and fwdslash.

If cargo is thinking it's running on cmd but it's running on Git Bash, it's possible it's emitting backslash and it's not working because of that.

However, I just tested calling cargo from Git Bash on my machine, and it seems like it's working fine, so it's probably more complicated than that.

You're sure there's a file at the indicated path? (And not, say, a OneDrive pseudo-file?)

I have been working with my development folders one OneDrive for 8 months or so. This is the first I ever came up with this problem.

me bad. Since I worked from the gfx repository examples directory I missed that I had another layer of directories in my new repository. got rid of the extra layer.

Frank

One other note. I mention above that gfx built correctly. Diving in a little further I rebuilt gfx with the verbose flag and noticed that the backslash prepended to a bin path happened there but worked just find. Cargo and rustc are smart enough to deal with it.

I just seized the backslash originally because it looked so out of place. Sigh