https://github.com/stoorps/vib-rs
Rust libraries for working with Vib.
https://github.com/stoorps/vib-rs
silverblue ublue-custom-image ublue-os vib vib-plugin
Last synced: 9 months ago
JSON representation
Rust libraries for working with Vib.
- Host: GitHub
- URL: https://github.com/stoorps/vib-rs
- Owner: stoorps
- License: mit
- Created: 2025-02-18T12:42:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T02:58:44.000Z (over 1 year ago)
- Last Synced: 2025-02-19T03:29:09.518Z (over 1 year ago)
- Topics: silverblue, ublue-custom-image, ublue-os, vib, vib-plugin
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/stoorps/vib-silverblue/actions/workflows/build.yml)
# vib-api
Rust library for creating vib plugins easily.
This includes macros, and models for the Recipe passed in by vib.
There is an example repo [available here](/examples/example-plugin/).
Example code:
```Rust
use std::ffi:: CString;
use std::os::raw::c_char;
use serde::{Serialize, Deserialize};
use vib_api::{Recipe, build_module, plugin_info};
#[derive(Serialize, Deserialize)]
#[plugin_info(name = "example-plugin", module_type = "0", use_container_cmds = "0")]
pub struct ModuleInfo {
pub name: String,
pub r#type: String,
//Add your custom fields here!
}
#[build_module]
fn build(module: ModuleInfo, _recipe: Recipe) -> String {
//add your plugin code here!
"".into()
}
```