wasm_spec_interpreter/
without_library.rs1use crate::{SpecExport, SpecInstance, SpecValue};
10
11pub fn instantiate(_module: &[u8]) -> Result<SpecInstance, String> {
12 fail_at_runtime()
13}
14
15pub fn interpret(
16 _instance: &SpecInstance,
17 _name: &str,
18 _parameters: Option<Vec<SpecValue>>,
19) -> Result<Vec<SpecValue>, String> {
20 fail_at_runtime()
21}
22
23pub fn interpret_legacy(
24 _module: &[u8],
25 _parameters: Option<Vec<SpecValue>>,
26) -> Result<Vec<SpecValue>, String> {
27 fail_at_runtime()
28}
29
30pub fn export(_instance: &SpecInstance, _name: &str) -> Result<SpecExport, String> {
31 fail_at_runtime()
32}
33
34fn fail_at_runtime() -> ! {
35 panic!(
36 "wasm-spec-interpreter was built without its Rust-to-OCaml shim \
37 library; re-compile with the dependencies listed in its README.md."
38 );
39}
40
41pub fn setup_ocaml_runtime() {}