Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/tests/all/engine.rs
2450 views
1
use super::*;
2
use wasmtime::*;
3
4
#[test]
5
fn engine_without_compiler_cannot_compile() -> Result<()> {
6
let mut config = Config::new();
7
config.enable_compiler(false);
8
let engine = Engine::new(&config)?;
9
match Module::new(&engine, r#"(module (func (export "f") nop))"#) {
10
Ok(_) => panic!("should not compile without a compiler"),
11
Err(err) => err.assert_contains("Engine was not configured with a compiler"),
12
}
13
Ok(())
14
}
15
16