Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows release #2784

Open
chenyan-dfinity opened this issue Sep 15, 2021 · 4 comments
Open

Windows release #2784

chenyan-dfinity opened this issue Sep 15, 2021 · 4 comments

Comments

@chenyan-dfinity
Copy link
Contributor

How hard is it to build a Windows binary for moc?

Someone is asking on reddit: https://www.reddit.com/r/dfinity/comments/mo9a16/hey_i_heard_dfinity_created_a_language_called/hcroi8y/?utm_source=share&utm_medium=ios_app&utm_name=iossmf&context=3

@nomeata
Copy link
Collaborator

nomeata commented Sep 15, 2021

Related question at https://forum.dfinity.org/t/native-windows-support/1241/12

Hmm, did we do some research into this? I think we at least discussed it a bit, already two years ago (#580 (comment)).

I think it is relatively hard. For Haskell applications, I know how to cross-compile from nix (see dfinity/ic-hs#9 for example), but I don’t know of equivalent efforts for Ocaml.

Ah, here someone tried it before https://discuss.ocaml.org/t/nix-ocaml-cross-compilation-to-windows/5399. And looks like I investigated this in April. Without success.

May be easier to take moc.js and ship it with node :-)

@chenyan-dfinity
Copy link
Contributor Author

Ah, there's also WSL. I think people can run Linux binary in WSL?

@rossberg
Copy link
Contributor

Most of the OCaml toolchain works fine on Windows with Cygwin. Building Motoko could probably be made relatively easy, if we didn't depend on nix...

I don't know how easy it is to set up nix on WSL. Might be simple?

@nomeata
Copy link
Collaborator

nomeata commented Sep 16, 2021

We also need rust for the RTS. Of course we can use the same file as produced on Linux, but then you have a cross-system build, also not easy.

Maybe cygwin in nix is an option.

Or not using nix for this part, building in a GitHub action job on windows, fetching the RTS from the other jobs.

So there are many ways that are possibly possible, but none that are trivial.

If this were a normal open source project I'd say: let's wait until this is an itch strong enough for someone to scratch it and make a PR :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants