Fixed rust, named the libraries sdk's, better examples

This commit is contained in:
2024-06-16 00:59:04 +03:00
parent 407faab33a
commit f55279b7ef
20 changed files with 229 additions and 226 deletions

25
sdk/rust/src/lib.rs Normal file
View File

@@ -0,0 +1,25 @@
#[macro_use]
mod magic;
mod c_buffer;
mod plugin_info;
pub use c_buffer::*;
pub use plugin_info::*;
pub use anyhow::Result;
pub trait DimPlugin {
fn init(&mut self);
fn pre_reload(&mut self);
fn post_reload(&mut self);
fn poll(&mut self, f: &mut CBuffer) -> Result<()>;
fn free(&mut self) {}
}