improv(plugins): Convert web plugin to Rust plugin, with config support
This commit is contained in:
parent
251dcd5b2c
commit
48f09be4c9
15 changed files with 324 additions and 164 deletions
|
|
@ -7,7 +7,7 @@ use flume::{unbounded, Receiver, Sender};
|
|||
use futures_lite::{future, StreamExt};
|
||||
use regex::Regex;
|
||||
use slab::Slab;
|
||||
use std::io::Write;
|
||||
use std::io::{self, Write};
|
||||
|
||||
pub type PluginKey = usize;
|
||||
|
||||
|
|
@ -23,6 +23,12 @@ pub struct PluginHelp {
|
|||
pub description: String,
|
||||
pub help: Option<String>,
|
||||
}
|
||||
|
||||
pub async fn main() {
|
||||
let stdout = io::stdout();
|
||||
Service::new(stdout.lock()).exec().await
|
||||
}
|
||||
|
||||
pub struct Service<O> {
|
||||
active_search: Vec<(PluginKey, PluginSearchResult)>,
|
||||
awaiting_results: usize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue