5 个稳定版本
使用旧的 Rust 2015
2.3.0 | 2022年5月1日 |
---|---|
2.2.0 | 2022年4月30日 |
1.0.0 |
|
#247 in #plugin
145KB
2.5K SLoC
Rust hexchat-unsafe-plugin
hexchat-unsafe-plugin
为开发原生 HexChat 插件提供了 Rusty API 绑定。
要开始,在一个结构体上实现 hexchat_plugin::Plugin
,并在您的 lib.rs
中使用 hexchat_plugin!('a, impl Plugin<'a>)
宏。不要提供 main
,因为它将不会工作。请确保使用 cdylib
crate-type,否则它也不会工作。
此外,请注意插件可能会被多次加载。建议避免使用全局状态(静态,线程局部),以防止出现相关问题。
示例
对于使用此存储库的成熟插件,请参阅 [TODO]。
许可证
Hexchat Plugin API Bindings for Rust
Copyright (C) 2018, 2021, 2022 Soni L.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
依赖项
~1.5MB
~36K SLoC