33 lines
668 B
Rust
33 lines
668 B
Rust
mod load;
|
|
mod magic;
|
|
mod symbol;
|
|
mod write;
|
|
|
|
use crate::vm::object_type::{DmFn, DmImplementation, DmInterface};
|
|
use std::rc::Rc;
|
|
|
|
pub struct DmLib {
|
|
pub name: String,
|
|
pub constants: Vec<DmConstant>,
|
|
pub interfaces: Vec<Rc<DmInterface>>,
|
|
pub implementations: Vec<Rc<DmImplementation>>,
|
|
pub functions: Vec<Rc<DmFn>>,
|
|
}
|
|
|
|
impl DmLib {
|
|
pub fn new(name: &str) -> DmLib {
|
|
DmLib {
|
|
name: name.to_string(),
|
|
constants: Vec::new(),
|
|
interfaces: Vec::new(),
|
|
implementations: Vec::new(),
|
|
functions: Vec::new(),
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub enum DmConstant {
|
|
String(String),
|
|
}
|