mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-31 23:11:04 +00:00
This change also cleans up the `wasi-test` generation a bit. It's actually still really, really messy, but at least now it's split up into easier to understand chunks. There's still a lot of low-hanging fruit in terms of improving the readibilty and maintainability of the code.
30 lines
787 B
Rust
30 lines
787 B
Rust
pub static ALL_WASI_VERSIONS: &[WasiVersion] = &[WasiVersion::Unstable, WasiVersion::Snapshot1];
|
|
pub static LATEST_WASI_VERSION: &[WasiVersion] = &[WasiVersion::get_latest()];
|
|
|
|
#[derive(Debug, Clone, Copy)]
|
|
pub enum WasiVersion {
|
|
/// A.K.A. Snapshot0
|
|
Unstable,
|
|
Snapshot1,
|
|
}
|
|
|
|
impl WasiVersion {
|
|
pub const fn get_latest() -> Self {
|
|
Self::Snapshot1
|
|
}
|
|
|
|
pub fn get_compiler_toolchain(&self) -> &'static str {
|
|
match self {
|
|
WasiVersion::Unstable => "nightly-2019-09-13",
|
|
WasiVersion::Snapshot1 => "nightly-2019-12-18",
|
|
}
|
|
}
|
|
|
|
pub fn get_directory_name(&self) -> &'static str {
|
|
match self {
|
|
WasiVersion::Unstable => "unstable",
|
|
WasiVersion::Snapshot1 => "snapshot1",
|
|
}
|
|
}
|
|
}
|