forest icon indicating copy to clipboard operation
forest copied to clipboard

Windows support

Open austinabell opened this issue 4 years ago • 14 comments

Issue summary

Forest doesn't work out of the box on windows for sure, so the documentation should be updated for installation instructions for required components (OpenCL and protoc might be a bit challenging for concise documentation).

If anyone attempts to run on windows, please document any incompatible issues so it can be resolved.

Other information and links

austinabell avatar May 18 '20 16:05 austinabell

I can attempt this, I was close to get it to compile, from what I see it is very possible to write a build script out of the box but requires a few things before hand

StaticallyTypedAnxiety avatar May 18 '20 16:05 StaticallyTypedAnxiety

This could a good area for Forest product differentiation as Lotus doesn't support Windows.

lerajk avatar Oct 04 '21 15:10 lerajk

I got Forest to build on WSL on Windows 11.

installed WSL (default Ubuntu - 20.04) Installed Rustup sudo apt-get update sudo apt-get upgrade sudo apt-get install make build-essential libssl-dev libclang-dev pkg-config m4 make release

I tried plain Windows 11 by installing Rustup, Git, and VS 2019 C++ build tools. However, I could not get past gmp-mpfr-sys as it requires MinGW which at that point IMO WSL is a better choice.

truemagic-coder avatar Jan 08 '22 10:01 truemagic-coder

@jdjaustin Would you be interested in looking into this? It would involve running Windows in a virtual machine.

lemmih avatar Oct 25 '22 08:10 lemmih

@jdjaustin Would you be interested in looking into this? It would involve running Windows in a virtual machine.

I guess I missed this message back in the day. I can investigate this now.

jdjaustin avatar Sep 14 '23 08:09 jdjaustin

@lemmih @jdjaustin I'd approach adding Windows support with caution. Windows users can use WSL or Docker to run Forest. Supporting Windows natively would add work for us that might not be worth it, e.g., bugs that surface only on Windows (or windows versions of crates we use) and increased CI duration. It might also block us in the future if we would need to use a crate that doesn't support windows for whatever reason.

LesnyRumcajs avatar Sep 18 '23 12:09 LesnyRumcajs

@lemmih @jdjaustin I'd approach adding Windows support with caution. Windows users can use WSL or Docker to run Forest. Supporting Windows natively would add work for us that might not be worth it, e.g., bugs that surface only on Windows (or windows versions of crates we use) and increased CI duration. It might also block us in the future if we would need to use a crate that doesn't support windows for whatever reason.

Honestly, while it's been a good learning exercise, so far the effort to run Forest on Windows natively may indeed not be worth it; as you mention, from what I understand some folks (including @aatifsyed and @hanabi1224 ?) are already successfully running Forest using WSL.

jdjaustin avatar Sep 18 '23 12:09 jdjaustin

Just curious, what's preventing today to have a native Windows build?

elmattic avatar Sep 18 '23 13:09 elmattic

Just curious, what's preventing today to have a native Windows build?

I'm interested in this as well. I half expected everything to work out of the box.

lemmih avatar Sep 18 '23 13:09 lemmih

Just curious, what's preventing today to have a native Windows build?

I'm interested in this as well. I half expected everything to work out of the box.

Well it might have something to do with me emulating Windows on an ARM device, but we had to disable the default asm feature for sha2 and sha2raw and it is currently failing to build blst but I'm still not sure exactly why. Maybe someone with an x86 machine can also give it a try and report their findings.

jdjaustin avatar Sep 18 '23 13:09 jdjaustin

@jdjaustin I can have a look as well.

Have you tried UTM with QEMU to emulate x86 or something else? I'm using this VM to run some 64-bit ARM Linux image on my Mac and it works fairly well (but no instruction emulation in this case though).

elmattic avatar Sep 18 '23 13:09 elmattic

Have you tried UTM with QEMU to emulate x86 or something else?

This is precisely what I mean by too much work for too little gain. :rofl:

LesnyRumcajs avatar Sep 18 '23 13:09 LesnyRumcajs

Related tracking issues:

https://github.com/filecoin-project/rust-fil-proofs/issues/1718

https://github.com/RustCrypto/hashes/issues/502

~~https://github.com/briansmith/ring/issues/1614~~

https://github.com/supranational/blst/issues/190

jdjaustin avatar Sep 19 '23 14:09 jdjaustin

https://github.com/briansmith/ring/issues/1614

This is done in ring 0.17.

briansmith avatar Oct 09 '23 16:10 briansmith