summaryrefslogtreecommitdiff
path: root/matrix-stdlib/src/lib.rs
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-02-26 19:00:42 -0500
committerFreya Murphy <freya@freyacat.org>2024-02-26 19:00:42 -0500
commit158bcae00dbe2af50e51468ad003fb594a858e6d (patch)
treed5639b745b2a24e417e8003694a8994354e2d708 /matrix-stdlib/src/lib.rs
parentfn call fix (diff)
downloadmatrix-158bcae00dbe2af50e51468ad003fb594a858e6d.tar.gz
matrix-158bcae00dbe2af50e51468ad003fb594a858e6d.tar.bz2
matrix-158bcae00dbe2af50e51468ad003fb594a858e6d.zip
changes
Diffstat (limited to '')
-rw-r--r--matrix-stdlib/src/lib.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/matrix-stdlib/src/lib.rs b/matrix-stdlib/src/lib.rs
index 6e0cfc1..334de90 100644
--- a/matrix-stdlib/src/lib.rs
+++ b/matrix-stdlib/src/lib.rs
@@ -1,7 +1,25 @@
-use matrix::vm::Vm;
+use matrix::vm::{Vm, StackFrame};
+mod core;
+mod sys;
+mod math;
mod io;
+mod iter;
+
+pub(crate) type VmArgs<'a, 'b> = (&'a mut Vm, &'b mut StackFrame);
+
+macro_rules! error {
+ ($($arg:tt)*) => {
+ Err(format!($($arg)*).into())
+ };
+}
+
+pub(crate) use error;
pub fn load(vm: &mut Vm) {
+ core::load(vm);
+ sys::load(vm);
io::load(vm);
+ iter::load(vm);
+ math::load(vm);
}