mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-23 19:49:05 +08:00
opt: add flutter feat
This commit is contained in:
parent
bdd314856f
commit
8cad0b7a6c
@ -10,9 +10,14 @@ name = "custom_plugin"
|
||||
path = "src/lib.rs"
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
|
||||
[features]
|
||||
default = ["flutter"]
|
||||
flutter = []
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "1.4.0"
|
||||
rustdesk = { path = "../../", version = "1.2.0"}
|
||||
rustdesk = { path = "../../", version = "1.2.0", features = ["flutter"]}
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
@ -9,6 +9,8 @@ lazy_static::lazy_static! {
|
||||
pub static ref API: RustDeskApiTable = RustDeskApiTable::default();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[no_mangle]
|
||||
fn plugin_name() -> *const c_char {
|
||||
return PLUGIN_NAME.as_ptr();
|
||||
|
@ -36,8 +36,8 @@ pub trait Plugin {
|
||||
#[repr(C)]
|
||||
#[derive(Default, Clone)]
|
||||
pub struct RustDeskPluginTable {
|
||||
pub init: Option<PluginInitFunc>,
|
||||
pub dispose: Option<PluginDisposeFunc>,
|
||||
pub init: Option<PluginInitFunc>, // NonNull
|
||||
pub dispose: Option<PluginDisposeFunc>, // NonNull
|
||||
}
|
||||
|
||||
pub struct PluginImpl {
|
||||
|
Loading…
Reference in New Issue
Block a user