Is there an existing issue for this?
Description
Prompted by an issue caused by the old feature resolver in #324 where mio was being compiled as it was a dependency of tokio when some features were enabled, despite us not enabling any features for tokio. This caused issues since mio doesn't compile to the wasm32-unknown-unknown target.
For the sake of maintenance, and possibly making it easier to migrate to the next Rust edition when that releases, we should consider moving the worker, worker-sys, worker-build, worker-macros and worker-sandbox projects to the 2021 edition.
Aside from any code changes that may be necessary with changing the edition, it would also change the minimum supported Rust version to 1.56. 1.56 was released on October 2021 so I think it's reasonable to expect the majority of users are on it.
Unfortunately we can't use rust-version to indicate to users that their Rust version is too old since that was added in 1.56, so they will just see this on 1.55 and older:
Caused by:
feature `edition2021` is required
The package requires the Cargo feature called `edition2021`, but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).
Consider trying a newer version of Cargo (this may require the nightly release).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.
The link will tell them that The 2021 edition has been stabilized in the 1.56 release.
Arguably, this issue was only created due to the resolver version so it's also an option that the 2018 edition stays and we just keep the resolver = 2 in Cargo.toml.
Is there an existing issue for this?
Description
Prompted by an issue caused by the old feature resolver in #324 where
miowas being compiled as it was a dependency oftokiowhen some features were enabled, despite us not enabling any features fortokio. This caused issues sincemiodoesn't compile to thewasm32-unknown-unknowntarget.For the sake of maintenance, and possibly making it easier to migrate to the next Rust edition when that releases, we should consider moving the
worker,worker-sys,worker-build,worker-macrosandworker-sandboxprojects to the 2021 edition.Aside from any code changes that may be necessary with changing the edition, it would also change the minimum supported Rust version to 1.56. 1.56 was released on October 2021 so I think it's reasonable to expect the majority of users are on it.
Unfortunately we can't use rust-version to indicate to users that their Rust version is too old since that was added in 1.56, so they will just see this on 1.55 and older:
The link will tell them that The 2021 edition has been stabilized in the 1.56 release.
Arguably, this issue was only created due to the resolver version so it's also an option that the 2018 edition stays and we just keep the
resolver = 2in Cargo.toml.