weirdnet-plugin 0.1.0

SDK for Weirdnet code space plugins: the stable C ABI (v2), the host API, frames and result views.
Documentation
  • Size
  • Source code size: 61.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • WeirdBrains/weirdnet-plugin
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • m3talsmith

weirdnet-plugin

The SDK for Weirdnet code space plugins: the stable C ABI (version 2), the safe [Host] API over the host's JSON methods, frames of loaded records, series helpers, result views, the ingest-connector methods, and the plugin! macro that exports the ABI.

use weirdnet_plugin::prelude::*;

pub fn run(host: &Host) -> Result<View> {
    let bars = host.input()?;
    let close = bars.f64("close")?;
    Ok(View::chart("close").x("timestamp", bars.f64("timestamp")?, true).line("close", close))
}
weirdnet_plugin::plugin!(run);

A plugin is a cdylib exporting weirdnet_plugin_abi, weirdnet_plugin_info and weirdnet_plugin_run (see src/abi.rs). Version 2 keeps version 1's layout; only the symbol names and the version number differ. The crate has no dependencies, so plugins build offline. Hosts load plugins with weirdnet-code-spaces.