opam-repository icon indicating copy to clipboard operation
opam-repository copied to clipboard

Package: Wasmer

Open rajdakin opened this issue 3 years ago • 3 comments

This PR adds the Wasmer package. Note: this PR ~has been tested to work on the Docker container, and~ makes use of the precompiled Wasmer libraries to allow its usage on every system (since Wasmer uses features incompatible with older versions of Rust that may be installed by the system's package manager).

EDIT: turns out the tests also fail on my machine, but only using the provided script in the CI. I'll investigate and fix it (but I can reproduce the issue).

rajdakin avatar Aug 31 '22 19:08 rajdakin

I've just attempted to build the Wasmer library from source in the Docker container, but the system cargo (cargo 1.46.0) is too old to support the required features ("feature resolver is required", then if I remove the problematic line, "failed to parse the edition key" because "this version of Cargo is older than the 2021 edition, and only supports 2015 and 2018 editions.").

rajdakin avatar Oct 01 '22 16:10 rajdakin

As a side note, I can't use the provided script to build the MacOS version as the Docker image seems to not exist (docker fails with the error "pull access denied for macos-homebrew-ocaml-4.14, repository does not exist or may require 'docker login': denied: requested access to the resource is denied").

rajdakin avatar Oct 01 '22 17:10 rajdakin

https://github.com/ocaml/opam-repository/pull/22204 added a conf-rust-2022 package. Is there any chance you could take example from this PR to have the wasmer built from source instead?

kit-ty-kate avatar Oct 13 '22 12:10 kit-ty-kate

I've looked at that package, but the system cargo for the "main tests" (Debian 11, which is the image used by the 5.0 OCaml compiler version) is only 1.46.0, which, as I mentioned previously, is too old. If you read the opam file, you can see that the centos-7, oraclelinux-7, debian-10, debian-11 and alpine-3.14 distributions are all expected to fail (with the additional comment of "rust 2021 is not in the default repository (version is too old)" or "does not have cargo by default")...

rajdakin avatar Oct 17 '22 09:10 rajdakin

Yeah, that's fine by us.

kit-ty-kate avatar Oct 17 '22 10:10 kit-ty-kate

in practice these are all old distributions and it shouldn't be too much of a big deal for users as they would be notified by the conf-rust-2021 package, that their rust version is too old. This is only a (temporary) problem for CI (we're looking at fixing that)

kit-ty-kate avatar Oct 17 '22 10:10 kit-ty-kate

EDIT: I've reverted the change to use conf-rust-2021 as it only requires Rust edition 2021, which only requires Rust to be at least 1.56, but a Rust package used by libwasmer (corosensei v0.1.3) has Rust version 1.59 as a requirement (which is therefore not guaranteed by this package).

rajdakin avatar Oct 17 '22 18:10 rajdakin

EDIT: I've reverted the change to use conf-rust-2021 as it only requires Rust edition 2021, which only requires Rust to be at least 1.56, but a Rust package used by libwasmer (corosensei v0.1.3) has Rust version 1.59 as a requirement (which is therefore not guaranteed by this package).

I would've said "close enough". We can't really have one package per version (that'd be a bit too much, though we could if you really need), but the error message seemed to be precise enough to indicate what to do

# error: package `corosensei v0.1.3` cannot be built because it requires rustc 1.59.0 or newer, while the currently active rustc version is 1.58.1

To me, modulo the suggestion i made just above, it looked fine to merge before.

kit-ty-kate avatar Oct 17 '22 18:10 kit-ty-kate

Should be good to go once https://github.com/ocaml/opam-repository/pull/22050#discussion_r997396463 is fixed

kit-ty-kate avatar Oct 17 '22 19:10 kit-ty-kate

Thanks! Sorry for the wait.

kit-ty-kate avatar Oct 17 '22 20:10 kit-ty-kate