Skip to content

mcp.rhai.logic #

fn generate_rhai_wrapper #

fn generate_rhai_wrapper(name string, source_path string) !string

fn rhai_wrapper_generation_prompt #

fn rhai_wrapper_generation_prompt(name string, source_code string) !string

Define a Rhai wrapper generator function for Container functions

fn run_wrapper_generation_task #

fn run_wrapper_generation_task(prompt_content string, gen RhaiGen) !string

Runs the task to generate Rhai wrappers

fn write_rhai_wrapper_module #

fn write_rhai_wrapper_module(wrapper WrapperModule, name string, path string) !string

functions is a list of function names that AI should extract and pass in

struct WrapperModule #

@[params]
struct WrapperModule {
pub:
	lib_rs             string
	example_rs         string
	engine_rs          string
	cargo_toml         string
	example_rhai       string
	generic_wrapper_rs string
	wrapper_rs         string
}