aboutsummaryrefslogtreecommitdiff
path: root/crates/sloth_vm
diff options
context:
space:
mode:
Diffstat (limited to 'crates/sloth_vm')
-rw-r--r--crates/sloth_vm/Cargo.toml6
-rw-r--r--crates/sloth_vm/src/lib.rs21
2 files changed, 27 insertions, 0 deletions
diff --git a/crates/sloth_vm/Cargo.toml b/crates/sloth_vm/Cargo.toml
new file mode 100644
index 0000000..d27b6d2
--- /dev/null
+++ b/crates/sloth_vm/Cargo.toml
@@ -0,0 +1,6 @@
+[package]
+name = "sloth_vm"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
diff --git a/crates/sloth_vm/src/lib.rs b/crates/sloth_vm/src/lib.rs
new file mode 100644
index 0000000..2210a57
--- /dev/null
+++ b/crates/sloth_vm/src/lib.rs
@@ -0,0 +1,21 @@
+#![allow(dead_code)]
+#![warn(
+ clippy::wildcard_imports,
+ clippy::string_add,
+ clippy::string_add_assign,
+ clippy::manual_ok_or,
+ unused_lifetimes
+)]
+
+const STACK_SIZE: usize = 1024;
+
+pub struct VM {
+ stack: [u8; STACK_SIZE],
+ constants: Vec<u8>,
+}
+
+#[cfg(test)]
+mod tests {
+ #[test]
+ fn add_program() {}
+}