diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a4c95842..8ab6a5801 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -296,9 +296,13 @@ jobs: - run: name: Build shared library for macOS command: make release-build-macos - - run: - name: Build shared library for Windows - command: make release-build-windows + # Shared libraries for Windows (.dll) currently do not work (https://github.com/CosmWasm/wasmvm/issues/389) + # and .dll builds are not deterministic. + # Deactivating this step to avoid polluting the git hostory. + # + # - run: + # name: Build shared library for Windows + # command: make release-build-windows - run: name: Debug build results command: ls -l ./internal/api diff --git a/README.md b/README.md index 2a4358bc0..90138868d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # wasmvm -This is a wrapper around the [CosmWasm VM](https://github.com/CosmWasm/cosmwasm/tree/main/packages/vm). -It allows you to compile, initialize and execute CosmWasm smart contracts -from Go applications, in particular from [x/wasm](https://github.com/CosmWasm/wasmd/tree/master/x/wasm). +This is a wrapper around the +[CosmWasm VM](https://github.com/CosmWasm/cosmwasm/tree/main/packages/vm). It +allows you to compile, initialize and execute CosmWasm smart contracts from Go +applications, in particular from +[x/wasm](https://github.com/CosmWasm/wasmd/tree/master/x/wasm). ## Structure @@ -93,12 +95,12 @@ CGO_ENABLED=0 go build . See [COMPILER_VERSIONS.md](docs/COMPILER_VERSIONS.md) for information on Go and Rust compiler support. -The Rust implementation of the VM is compiled to a library called libwasmvm. This is -then linked to the Go code when the final binary is built. For that reason not all -systems supported by Go are supported by this project. +The Rust implementation of the VM is compiled to a library called libwasmvm. +This is then linked to the Go code when the final binary is built. For that +reason not all systems supported by Go are supported by this project. -Linux (tested on Ubuntu, Debian, and CentOS7, Alpine) and macOS is supported. -We are working on Windows (#288). +Linux (tested on Ubuntu, Debian, and CentOS7, Alpine) and macOS is supported. We +are working on Windows (#288). [#288]: https://github.com/CosmWasm/wasmvm/pull/288 @@ -125,12 +127,13 @@ which for example excludes all 32 bit systems. | macOS | x86_64 | static | πŸš«β€‹ | | | macOS | aarch64 | shared | βœ…β€‹libwasmvm.dylib | Fat/universal library with multiple archs ([#294]) | | macOS | aarch64 | static | πŸš«β€‹ | | -| Windows (mingw) | x86_64 | shared | βœ…β€‹wasmvm.dll | | -| Windows (mingw) | x86_64 | static | πŸš«β€‹ | | -| Windows (mingw) | aarch64 | shared | πŸš«β€‹ | | -| Windows (mingw) | aarch64 | static | πŸš«β€‹ | | +| Windows (mingw) | x86_64 | shared | πŸ—β€‹wasmvm.dll | Shared library linking not working on Windows ([#389]) | +| Windows (mingw) | x86_64 | static | πŸš«β€‹ | Unclear if this can work using a cross compiler; needs research on .lib (MSVC toolchain) vs. .a (GNU toolchain). ([#389]) | +| Windows (mingw) | aarch64 | shared | πŸš«β€‹ | Shared library linking not working on Windows ([#389]) | +| Windows (mingw) | aarch64 | static | πŸš«β€‹ | Unclear if this can work using a cross compiler; needs research on .lib (MSVC toolchain) vs. .a (GNU toolchain). ([#389]) | [#294]: https://github.com/CosmWasm/wasmvm/pull/294 +[#389]: https://github.com/CosmWasm/wasmvm/issues/389 @@ -146,18 +149,19 @@ Please read the [Documentation](./spec/Index.md) to understand both the general ## Development -There are two halfs to this code - go and rust. The first step is to ensure that there is -a proper dll built for your platform. This should be `api/libwasmvm.X`, where X is: +There are two halfs to this code - go and rust. The first step is to ensure that +there is a proper dll built for your platform. This should be `api/libwasmvm.X`, +where X is: - `so` for Linux systems - `dylib` for MacOS - `dll` for Windows - Not currently supported due to upstream dependency -If this is present, then `make test` will run the Go test suite and you can import this code freely. -If it is not present you will have to build it for your system, and ideally add it to this repo -with a PR (on your fork). We will set up a proper CI system for building these binaries, -but we are not there yet. +If this is present, then `make test` will run the Go test suite and you can +import this code freely. If it is not present you will have to build it for your +system, and ideally add it to this repo with a PR (on your fork). We will set up +a proper CI system for building these binaries, but we are not there yet. -To build the rust side, try `make build-rust` and wait for it to compile. This depends on -`cargo` being installed with `rustc` version 1.47+. Generally, you can just use `rustup` to -install all this with no problems. +To build the rust side, try `make build-rust` and wait for it to compile. This +depends on `cargo` being installed with `rustc` version 1.47+. Generally, you +can just use `rustup` to install all this with no problems. diff --git a/docs/libwasmvm_builds.py b/docs/libwasmvm_builds.py index 506f36ca8..34ffb918d 100644 --- a/docs/libwasmvm_builds.py +++ b/docs/libwasmvm_builds.py @@ -15,7 +15,7 @@ def wasmer22_supported(os, cpu, build_type): if os == "Windows (mingw)": if cpu == "x86_64" and build_type == "shared": - return SUPPORTED + "wasmvm.dll" + return UNDER_CONSTRUCTION + "wasmvm.dll" else: return UNSUPPORTED if os == "macOS" and build_type == "static": @@ -47,11 +47,16 @@ def get_note(os, cpu, build_type): return "Possible but not needed" if os == "macOS" and build_type == "shared": return "Fat/universal library with multiple archs ([#294])" + if os == "Windows (mingw)" and build_type == "shared": + return "Shared library linking not working on Windows ([#389])" + if os == "Windows (mingw)" and build_type == "static": + return "Unclear if this can work using a cross compiler; needs research on .lib (MSVC toolchain) vs. .a (GNU toolchain). ([#389])" return "" def get_links(): return """ [#294]: https://github.com/CosmWasm/wasmvm/pull/294 +[#389]: https://github.com/CosmWasm/wasmvm/issues/389 """ print("") diff --git a/internal/api/wasmvm.dll b/internal/api/wasmvm.dll deleted file mode 100755 index a8569366b..000000000 Binary files a/internal/api/wasmvm.dll and /dev/null differ