Skip to content

Commit cd490f4

Browse files
committed
Ensure make_compiler_config returns singlepass
1 parent 1ca93a4 commit cd490f4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/vm/src/wasm_backend/engine.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn cost(operator: &Operator) -> u64 {
4545
}
4646
}
4747

48-
/// Use Cranelift as the compiler backend if the feature is enabled
48+
/// Creates a compiler config using Singlepass
4949
pub fn make_compiler_config() -> impl CompilerConfig + Into<Engine> {
5050
wasmer::Singlepass::new()
5151
}
@@ -110,6 +110,12 @@ mod tests {
110110
assert_eq!(cost(&Operator::I64Extend8S {}), 115);
111111
}
112112

113+
#[test]
114+
fn make_compiler_config_returns_singlepass() {
115+
let cc = Box::new(make_compiler_config());
116+
assert_eq!(cc.compiler().name(), "singlepass");
117+
}
118+
113119
#[test]
114120
fn limit_to_pages_works() {
115121
// rounds down

0 commit comments

Comments
 (0)