mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-17 09:51:28 +03:00
remove useless code
This commit is contained in:
@@ -1,28 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "custom_plugin"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
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", features = ["flutter"]}
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
codegen-units = 1
|
|
||||||
panic = 'abort'
|
|
||||||
strip = true
|
|
||||||
#opt-level = 'z' # only have smaller size after strip
|
|
||||||
rpath = true
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
use librustdesk::api::RustDeskApiTable;
|
|
||||||
/// This file demonstrates how to write a custom plugin for RustDesk.
|
|
||||||
use std::ffi::{c_char, c_int, CString};
|
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
|
||||||
pub static ref PLUGIN_NAME: CString = CString::new("A Template Rust Plugin").unwrap();
|
|
||||||
pub static ref PLUGIN_ID: CString = CString::new("TemplatePlugin").unwrap();
|
|
||||||
// Do your own logic based on the API provided by RustDesk.
|
|
||||||
pub static ref API: RustDeskApiTable = RustDeskApiTable::default();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
fn plugin_name() -> *const c_char {
|
|
||||||
return PLUGIN_NAME.as_ptr();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
fn plugin_id() -> *const c_char {
|
|
||||||
return PLUGIN_ID.as_ptr();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
fn plugin_init() -> c_int {
|
|
||||||
return 0 as _;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
fn plugin_dispose() -> c_int {
|
|
||||||
return 0 as _;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user