extern crate log;
use nanoid::nanoid;
use rust_multistackvm::multistackvm::VM;
#[derive(Clone)]
pub struct Bund {
pub id: String,
pub vm: VM,
}
impl Bund {
fn init() -> Self {
let vmid = nanoid!();
Self {
id: vmid,
vm: VM::new(),
}
}
pub fn new() -> Self {
let mut res = Bund::init();
match res.init_lib() {
Ok(_) => {},
Err(err) => {
log::error!("Error during init_stdlib: {}", err);
}
};
res
}
}