Simple repository containing some plugins running with Core QUIC. This is a work in progress!
All the plugins are listed in alphabetical order.
max-data: simply rewrite processing of max-datasuper-frame: a dummy frame sent once per RTTprivacy-padding: force a specific sending pattern of packets having the same sizelogger: Log data in a file.probe-path: from the application, request sending path challenge and get delay for path responsebdp-frame: resume the congestion control state of a previous connection
When you want to compile a plugin, go to the root of the related plugin. Then, you can compile it with the following commands.
wasm-pack build --release
cp pkg/plugin_name_bg.wasm plugin_name.wasmSee the generate_wasms.sh file.
Each plugin has its own crate/project. To start a new one, at the root of this repository launch this command:
cargo init --lib plugin-nameThen you need to add the following lines to the generated Cargo.toml file.
[dependencies]
pluginop-wasm = { path = "relative/path/to/pluginop-wasm" }
wasm-bindgen = "0.2"
# Indicate that we need to generate a WASM file, otherwise not WASM would be generated at compilation.
[lib]
crate-type =["cdylib"]
[profile.release]
lto = trueNote that at some point, pluginop-wasm will be published on crates.io, and adding this dependency would be done simply using, e.g., pluginop-wasm = "1".
Seems you forgot to add the following in the Cargo.toml.
# Indicate that we need to generate a WASM file, otherwise not WASM would be generated at compilation.
[lib]
crate-type =["cdylib"]Two common errors: you forgot either the pub extern or the #[no_mangle].
Remember that an exposed protocol operation always looks like the following.
#[no_mangle]
pub extern fn protocol_operation_name(penv: &mut PluginEnv) -> i64 { /* ... */ }