cultivar/common/src/api.rs

17 lines
382 B
Rust

use sp_runtime_interface::runtime_interface;
#[runtime_interface]
pub trait Api {
/*fn print_hello(nb: u32) -> u32 {
println!("hello {nb}");
nb + 42
}
fn walk(sim_id: SimId, entity_id: EntityId, direction: Direction) {
if let Some(sim) = sims.read().get_mut(&sim_id) {
if let Some(entity) = sim.entities.get_mut(&entity_id) {
entity.walk(direction)
}
}
}*/
}