lyra-wasm-scripting-test/guests/rust/witguest/wit/world.wit

22 lines
501 B
Plaintext

package component:witguest;
interface math {
record vec3 {
x: f32,
y: f32,
z: f32,
}
}
/// An example world for the component to target.
world example {
import math;
import lyra:api/asset;
use lyra:api/ecs.{ecs-world, entity};
import host-print: func(msg: string);
export on-init: func(game-world: borrow<ecs-world>, owning-entity: entity) -> result;
export on-update: func(game-world: borrow<ecs-world>, owning-entity: entity) -> result;
}