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