Skip to content

An example for creating DOME plugins that calls Rust functions

License

Notifications You must be signed in to change notification settings

NinjasCL/dome-rust-plugin-example

Repository files navigation

Example DOME Rust Plugin

This example is similar to the traditional plugin. But we are calling a Rust function to log a message.

console

  • test.c:
void alertMethod(WrenVM* vm) {
  // ...
  core->log(ctx, "%s\n", rust_function());
  // ...
}

Is important to include the generated static lib in the compilation step. libexample.a

test.dylib: test.c
	gcc -dynamiclib -o test.dylib -I../../include test.c libexample.a -undefined dynamic_lookup