autoagents_core/tool/runtime/mod.rs
1use super::ToolCallError;
2use std::fmt::Debug;
3
4#[cfg(feature = "wasmtime")]
5#[cfg(not(target_arch = "wasm32"))]
6mod wasm;
7
8#[cfg(feature = "wasmtime")]
9#[cfg(not(target_arch = "wasm32"))]
10pub use wasm::{WasmRuntime, WasmRuntimeError};
11
12pub trait ToolRuntime: Send + Sync + Debug {
13 fn execute(&self, args: serde_json::Value) -> Result<serde_json::Value, ToolCallError>;
14}