You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows support for Sway and its tooling is largely untested.
If you are a Windows user, you are currently recommended to use WSL. That is, at least until we start testing and publishing Windows binaries.
Moving Forward
If we wish to support Windows we should do the following for each of the fuel-core, fuels-rs and sway repos and their crates:
Check all path handling and that no code makes the assumption we're using unix-style paths. Primary culprits are the use of concatentating strings or using format! to construct paths, e.g.. format!("{}/{}/{}", foo, bar, baz). Windows does not support "foo/bar/baz" style paths. Instead, Path::join or PathBuf::collect should be used.
Another example: until #1213, Sway directly appended the path that you see in dep foo/bar/baz; verbatim, meaning that nested modules could never be successfully compiled on Windows.
Check that all I/O heavy dependencies are Windows-friendly. Well implemented crates will give compile errors on platforms they don't support, but that's not always the case.
Add a CI job that at least compiles and runs some basic tests on Windows.
Update docs w.r.t. any windows-specific needs in regards to system dependencies or setup.
Only once we've addressed these should we consider publishing and distributing Windows native binaries. Otherwise for the most part, Rust and the wider ecosystem makes it easy to write cross-platform code.
Opening this as a more general response to @ra0x3's question in #1513.
Current State
Windows support for Sway and its tooling is largely untested.
If you are a Windows user, you are currently recommended to use WSL. That is, at least until we start testing and publishing Windows binaries.
Moving Forward
If we wish to support Windows we should do the following for each of the
fuel-core
,fuels-rs
andsway
repos and their crates:format!
to construct paths, e.g..format!("{}/{}/{}", foo, bar, baz)
. Windows does not support "foo/bar/baz" style paths. Instead,Path::join
orPathBuf::collect
should be used.Another example: until #1213, Sway directly appended the path that you see in
dep foo/bar/baz;
verbatim, meaning that nested modules could never be successfully compiled on Windows.Only once we've addressed these should we consider publishing and distributing Windows native binaries. Otherwise for the most part, Rust and the wider ecosystem makes it easy to write cross-platform code.
Related
forc
binary for supported architectures under each release #1191.source-span
#413.The text was updated successfully, but these errors were encountered: