near / cargo-near

Cargo extension for building Rust smart contracts on NEAR
Apache License 2.0
34 stars 17 forks source link

fix: use `dunce` crate to remove UNC prefix #110

Closed iho closed 1 year ago

iho commented 1 year ago

Closes #4

On Windows, Path::canonicalize() returns a path with the UNC prefix not supported by cmd.exe and breaks the compilation of all crates that have include! macros in it. The problem is well known, and no proper solution at the current moment https://github.com/rust-lang/rust/issues/42869 For now, I just cut this UNC prefix, but if users complain about that, we can come out with a more sophisticated solution like https://lib.rs/crates/dunce