Skip to content

Commit 7a4f53a

Browse files
authored
Fix build without wat feature. (#12706)
Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
1 parent 58877f2 commit 7a4f53a

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

crates/c-api/include/wasmtime/component/component.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Component {
4040
WASMTIME_CLONE_WRAPPER(Component, wasmtime_component);
4141

4242
#ifdef WASMTIME_FEATURE_COMPILER
43+
44+
#ifdef WASMTIME_FEATURE_WAT
4345
/**
4446
* \brief Compiles a component from the WebAssembly text format.
4547
*
@@ -54,6 +56,7 @@ class Component {
5456
auto bytes = wasm.ok();
5557
return compile(engine, bytes);
5658
}
59+
#endif // WASMTIME_FEATURE_WAT
5760

5861
/**
5962
* \brief Compiles a component from the WebAssembly binary format.

crates/c-api/include/wasmtime/module.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class Module {
2929
WASMTIME_CLONE_WRAPPER(Module, wasmtime_module);
3030

3131
#ifdef WASMTIME_FEATURE_COMPILER
32+
33+
#ifdef WASMTIME_FEATURE_WAT
3234
/**
3335
* \brief Compiles a module from the WebAssembly text format.
3436
*
@@ -43,6 +45,7 @@ class Module {
4345
auto bytes = wasm.ok();
4446
return compile(engine, bytes);
4547
}
48+
#endif // WASMTIME_FEATURE_WAT
4649

4750
/**
4851
* \brief Compiles a module from the WebAssembly binary format.

crates/wasmtime/src/compile/code_builder/compile_time_builtins.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ impl<'a> CodeBuilder<'a> {
223223
///
224224
/// See the example in [CodeBuilder::expose_unsafe_intrinsics], which uses
225225
/// compile-time builtins.
226+
#[allow(unused_variables, reason = "`wasm_path` only used with `wat` feature")]
226227
pub unsafe fn compile_time_builtins_binary_or_text(
227228
&mut self,
228229
name: impl Into<Cow<'a, str>>,

0 commit comments

Comments
 (0)