<!-- <h1 align="center">
  <a href="https://gitee.com/lwleen/" target="_blank">
  <img src="doc/pic/icon_扩展.svg" width=200 height=200/><br>
  lwleen  
  </a>
</h1> -->

### 介绍
概述：rust实现的常用方法工具。   **此库是 `lwleen-rpc`  的应用扩展**
> 1. 主页 [Homepage](https://docs.qq.com/aio/p/sc3gu8sft77pu68)
> 2. 基础库      [https://crates.io/crates/lwleen-rpc](https://crates.io/crates/lwleen-rpc)
> 3. 应用库      [https://crates.io/crates/lwleen](https://crates.io/crates/lwleen)
> 4. crates文档  [https://docs.rs/lwleen](https://docs.rs/lwleen)




## 🛸 功能特色
- 终端过程_新建
- 文件移动过程_新建
- 新建web服务器
- gio_磁盘查询数组
- ffmpeg_缩略图
- 系统_读取网络NET数组
- 屏幕_截图
- sql_软件配置db打开
- slint 界面窗口



## ⚡️ 快速开始 
> `demo代码` [https://docs.rs/crate/lwleen/latest/source/src/mod_net/net.rs](https://docs.rs/crate/lwleen/latest/source/src/mod_net/net.rs)

```rust
use lwleen::prelude::*;

let 信令路由c1 =  信令路由::default();
let 信令路由c2 =  信令路由c1.clone();
let 结果 = 信令路由c1.pool异步任务_block阻塞完成(async move{
    let out1 = 信令路由c1.系统_读取内存数组().await;
    let out2 = 信令路由c1.系统_读取内存数组().block阻塞完成();
    (out1,out2)
});
println!("{:?}",结果);



//或直接调用( 启用对应features )
use lwleen::mod_ffmpeg::ffmpeg_截图到本地;
use lwleen::mod_term::终端管理;

```



> ### 特性
```toml
[features]
default          = []
mod_tool         = ["bytesize","urlencoding"]
mod_tool_md      = ["pulldown-cmark"]                                               # md转换器         0.5M
mod_tool_cipher  = ["aes","data-encoding"]                                          # 密码密钥
mod_os           = ["mod_tool","sysinfo","network-interface","regex-lite","wallpaper"] # 系统信息      0.7MB
mod_os_sim_event = ["enigo"]                                                        # 键盘和鼠标事件
mod_os_notify    = ["notify-rust"]                                                  # 系统通知
mod_ffmpeg       = ["ffmpeg-next","data-encoding"]                                  # 视频截图 
mod_file         = ["mod_tool","async-fs","notify","fs_extra","walkdir","mime_guess","mime-sniffer"] # 文件操作    0.8MB    
mod_net          = ["portpicker","local-ip-address","ipnet","async-io"]             # 基础net          0.3MB
mod_web          = ["mod_net","mod_file","salvo","async-compat"]                    # web服务器        9.4M        
mod_gtk          = ["mod_net","mod_tool","lwleen-rpc/mod_gtk","gio","linicon"]      # linux gio工具    1.3MB
mod_img          = ["image","data-encoding"]                                        # 图片操作
mod_screen       = ["mod_img","xcap"]                                               # 屏幕截图
mod_sqlite       = ["rusqlite"]                                                     # sqlite 数据库
mod_sqlimbo      = ["limbo"]                                                        # sqlite limbo 数据库
mod_term         = ["mod_os_sim_event", "alacritty_terminal","polling","url"]       # 终端             0.3MB
mod_slint        = ["mod_os","slint","slint-build"]                                 # slint 界面窗口
mod_dioxus       = ["mod_os","dioxus"]                                              # dioxus 界面窗口
kit_bin          = ["clap","libc","shlex","regex-lite"]                             # 打包 bin 文件    2.2M
kit_basic        = [
    "mod_tool","mod_tool_cipher",        #  0.1M
    "mod_os",                 #  0.7M
    "mod_os_sim_event", 
    "mod_screen", "mod_img",
    "mod_net",                #  0.3M
    "mod_file",               #  1MB
    "mod_term",               #  0.3M
]
kit_ext          = [
    "mod_sqlite",             #  2M
    "mod_web",                #  9.4M
    "mod_gtk",                #  gtk要求完整的线程控制权限,和 electron 某些UI框架冲突
    "mod_ffmpeg",             #  0.2M    electron 无法读取文件
    "mod_tool_md",            #  0.5M
    "mod_os_notify",          #  2.4M
    "mod_slint",              #  19.2M
    #"mod_dioxus"             #--- 试验中
    #"mod_sqlimbo",           #--- 试验中
    "kit_bin"                 #  2.2M
]

[dependencies]
ffmpeg-next  = { workspace = true ,optional = true, features = ["default"]   } 
...... 
```



## 📋 更多
> 可执行二进制文件，如下，**安装时必须带有 `kit_bin` 特性**，其余特性可选。
```sh
# 安装后，类似 ls,echo,  输入 lwleen 指令即可运行

cargo install lwleen --features "kit_bin"  --features "mod_os"
```
