Add a wasmtime settings command to print Cranelift settings.
This commit adds the `wasmtime settings` command to print out available Cranelift settings for a target (defaults to the host). The compile command has been updated to remove the Cranelift ISA options in favor of encouraging users to use `wasmtime settings` to discover what settings are available. This will reduce the maintenance cost for syncing the compile command with Cranelift ISA flags.
This commit is contained in:
@@ -2,6 +2,23 @@ use anyhow::Result;
|
||||
use std::io::BufWriter;
|
||||
use wasmtime::*;
|
||||
|
||||
#[test]
|
||||
fn checks_incompatible_target() -> Result<()> {
|
||||
let mut target = target_lexicon::Triple::host();
|
||||
target.operating_system = target_lexicon::OperatingSystem::Unknown;
|
||||
match Module::new(
|
||||
&Engine::new(Config::new().target(&target.to_string())?)?,
|
||||
"(module)",
|
||||
) {
|
||||
Ok(_) => unreachable!(),
|
||||
Err(e) => assert!(e
|
||||
.to_string()
|
||||
.contains("configuration does not match the host")),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn caches_across_engines() {
|
||||
let c = Config::new();
|
||||
|
||||
Reference in New Issue
Block a user