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

Add windows support #28

Closed
ethanfrey opened this issue Jan 2, 2020 · 17 comments · Fixed by #368
Closed

Add windows support #28

ethanfrey opened this issue Jan 2, 2020 · 17 comments · Fixed by #368

Comments

@ethanfrey
Copy link
Member

We have tested running cosmwasm and cosmwasm-vm inside a windows CI, so the code should work fine.

However, we currently only built the rust dll for unix and osx. We need to add a build step to set it up for windows and properly test that.

@ethanfrey
Copy link
Member Author

@ethanfrey
Copy link
Member Author

I did make an attempt at cross-compiling and it died:

    Running `rustc --crate-name wasmer_singlepass_backend --edition=2018 /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-singlepass-backend-0.12.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=16 -C overflow-checks=on --cfg 'feature="default"' -C metadata=fac002c34795faba -C extra-filename=-fac002c34795faba -C rpath --out-dir /code/target/x86_64-pc-windows-gnu/release/deps --target x86_64-pc-windows-gnu -C linker=x86_64-w64-mingw32-gcc -L dependency=/code/target/x86_64-pc-windows-gnu/release/deps -L dependency=/code/target/release/deps --extern bincode=/code/target/x86_64-pc-windows-gnu/release/deps/libbincode-ba725330654bc85e.rmeta --extern byteorder=/code/target/x86_64-pc-windows-gnu/release/deps/libbyteorder-6cdaed6318135e69.rmeta --extern dynasm=/code/target/release/deps/libdynasm-a14e8b2930de2254.so --extern dynasmrt=/code/target/x86_64-pc-windows-gnu/release/deps/libdynasmrt-0fc71efd3e6c1545.rmeta --extern lazy_static=/code/target/x86_64-pc-windows-gnu/release/deps/liblazy_static-1fc62350d196435d.rmeta --extern libc=/code/target/x86_64-pc-windows-gnu/release/deps/liblibc-9ae905ace4cfa34d.rmeta --extern nix=/code/target/x86_64-pc-windows-gnu/release/deps/libnix-37fde1ff377e11bb.rmeta --extern serde=/code/target/x86_64-pc-windows-gnu/release/deps/libserde-07f110fe8ca537cc.rmeta --extern serde_derive=/code/target/release/deps/libserde_derive-d785957a175e1087.so --extern smallvec=/code/target/x86_64-pc-windows-gnu/release/deps/libsmallvec-ae360692e030ebea.rmeta --extern wasmer_runtime_core=/code/target/x86_64-pc-windows-gnu/release/deps/libwasmer_runtime_core-19ee2c36b3831787.rmeta --cap-lints allow -L native=/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/winapi-x86_64-pc-windows-gnu-0.4.0/lib`
error: This crate doesn't yet support compiling on operating systems other than linux and macos and architectures other than x86_64
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-singlepass-backend-0.12.0/src/lib.rs:19:1
   |
19 | compile_error!("This crate doesn't yet support compiling on operating systems other than linux and macos and architectures other than x86_64");

This is blocked on wasmerio/wasmer#347

@ethanfrey
Copy link
Member Author

Left code here, if anyone wants to try: https://github.com/confio/go-cosmwasm/tree/windows-support

@ethanfrey ethanfrey mentioned this issue Jan 15, 2020
@ethanfrey ethanfrey added the Blocked Impossible to continue without outside intervention label Jun 29, 2020
@webmaster128
Copy link
Member

I did not find any OS restriction in the latest compiler-singlepass anymore (master/Wasmer Reborn). It might work now. But this is not tested.

@Hywan
Copy link

Hywan commented Feb 23, 2021

wasmer-compiler-singlepass works on any x86_64 OS now. It's also embedded in https://github.com/wasmerio/wasmer-go/ if it interests you :-).

@webmaster128
Copy link
Member

wasmer-compiler-singlepass works on any x86_64 OS now. It's also embedded in https://github.com/wasmerio/wasmer-go/ if it interests you :-).

Are you sure about this? I just gave it a try and ran into this error: https://github.com/wasmerio/wasmer/blob/1.0.2/lib/compiler-singlepass/src/compiler.rs#L51-L55

@Hywan
Copy link

Hywan commented Mar 15, 2021

Yes, Windows support isn't here yet. We are working on it these present days :-). I missed that, sorry.

cc @syrusakbary

@leejw51crypto
Copy link

hello, also apple m1

@webmaster128
Copy link
Member

webmaster128 commented Apr 26, 2021

@leejw51crypto Please see #53 for M1 (ARM Mac).

@webmaster128
Copy link
Member

The project that is required for this ticket is now tracked as singlepass version 2.

tomtau pushed a commit to tomtau/wasmvm that referenced this issue Oct 6, 2021
- add `CONTRIBUTING.md`
- add `CODE_OF_CONDUCT.md`
@sidenaio
Copy link

sidenaio commented Nov 9, 2021

Singlepass supports windows now

@webmaster128
Copy link
Member

webmaster128 commented Nov 9, 2021

Singlepass supports windows now

Right. Happy to integrate once the feature is included in a Wasmer release. See also CosmWasm/cosmwasm#1138 for a test integration.

@tomtau
Copy link

tomtau commented Dec 8, 2021

https://wasmer.io/posts/wasmer-2.1

@webmaster128
Copy link
Member

@tomtau Thanks for the nudge. We're on it now.

@tomtau
Copy link

tomtau commented Dec 8, 2021

the latest master branch of Wasmer seems to have some aarch64 support on Linux and macOS as well, but probably better to go with released versions first

@webmaster128
Copy link
Member

the latest master branch of Wasmer seems to have some aarch64 support on Linux and macOS as well, but probably better to go with released versions first

You need to distinguish between Wasmer in general and the Singlepass backend, which we need. See #53 (comment)

@webmaster128 webmaster128 removed the Blocked Impossible to continue without outside intervention label Jan 1, 2022
@webmaster128
Copy link
Member

See #288 for a PR to add Windows support

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