mindustry logic execution, map- and schematic- parsing and rendering
-rw-r--r--lemu/Cargo.toml3
-rw-r--r--lemu/src/executor/mod.rs4
2 files changed, 6 insertions, 1 deletions
diff --git a/lemu/Cargo.toml b/lemu/Cargo.toml
index 09a1c48..70e1b8d 100644
--- a/lemu/Cargo.toml
+++ b/lemu/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lemu"
-version = "0.1.0"
+version = "0.1.2"
edition = "2021"
description = "M-LOG runner"
authors = ["bend-n <[email protected]>"]
@@ -20,6 +20,7 @@ rust-fuzzy-search = { version = "0.1.1", optional = true }
[features]
bin = ["fimg/save", "diagnose"]
diagnose = ["rust-fuzzy-search", "yumy"]
+__send__ = []
default = ["bin"]
[[bin]]
diff --git a/lemu/src/executor/mod.rs b/lemu/src/executor/mod.rs
index 1998d3f..c900045 100644
--- a/lemu/src/executor/mod.rs
+++ b/lemu/src/executor/mod.rs
@@ -96,6 +96,10 @@ pub struct Drawing<'v> {
pub buffer: VecDeque<*const DrawInstr<'v>>,
}
+// SAFETY: false
+#[cfg(feature = "__send__")]
+unsafe impl Send for Drawing<'_> {}
+
impl<'v> Drawing<'v> {
fn buffer(&mut self, i: &DrawInstr<'v>) {
self.buffer.push_back(i);