mirror of
https://github.com/rustdesk/rustdesk
synced 2026-04-21 13:27:19 +00:00
opt: add flutter feat
This commit is contained in:
parent
bdd314856f
commit
8cad0b7a6c
3 changed files with 10 additions and 3 deletions
|
|
@ -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 a new issue