Skip to content

blocklessnetwork/runtime-extension-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Runtime Extension Wrapper | Rust

This library is a runtime extension wrapper for Rust extensions, built for the Blockless Network

Blockless module starter repository.

Usage

use runtime_extension_rust::CGIExtension;

#[tokio::main]
async fn main() -> Result<(), ()> {
    let mut ext = CGIExtension::new(
        String::from("example"),
        String::from("ex"),
        String::from("An example CGI extension"),
    );

    fn sample_method(params: Vec<String>) -> Result<String, String> {
        Ok(format!("Sample method called with args: {:?}", params))
    }

    ext.export(String::from("sample_method"), async_method);

    ext.execute().await;

    Ok(())
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages