49 lines
790 B
Rust
49 lines
790 B
Rust
#![cfg_attr(not(feature = "std"), no_std)]
|
|
|
|
pub mod ai;
|
|
#[cfg(not(feature = "std"))]
|
|
pub mod api;
|
|
pub mod board;
|
|
pub mod entities;
|
|
pub mod sim;
|
|
|
|
#[cfg(not(feature = "std"))]
|
|
extern crate alloc;
|
|
|
|
use std_bis::*;
|
|
|
|
pub mod std_bis {
|
|
#[cfg(not(feature = "std"))]
|
|
pub use alloc::{boxed::Box, vec, vec::Vec};
|
|
}
|
|
|
|
#[cfg(feature = "std")]
|
|
pub mod prelude {
|
|
pub use crate::{
|
|
ai::Ai,
|
|
//api::Api,
|
|
board::{Board, Direction},
|
|
entities::{WalkError, Entity, traits::Walker},
|
|
sim::{Sim, SimId, EntityId},
|
|
};
|
|
}
|
|
|
|
#[cfg(not(feature = "std"))]
|
|
pub mod prelude {
|
|
pub use crate::{
|
|
ai::Ai,
|
|
//api::Api,
|
|
board::{Board, Direction},
|
|
entities::WalkError,
|
|
sim::{SimId, EntityId},
|
|
};
|
|
}
|
|
|
|
/*#[runtime_interface]
|
|
pub trait Api {
|
|
fn foo(a: i32) -> i32 {
|
|
1.0f32.cos();
|
|
a.wrapping_add(42)
|
|
}
|
|
}*/
|