rline_macro
A Rust procedural macro for generating WebAssembly stubs with customizable serialization formats.
Overview
rline_bindgen is a procedural macro attribute designed to simplify the process of generating WebAssembly (Wasm)
stubs for Rust functions.
It allows you to choose the serialization format for input and output, supporting both "bincode" and "json".
Installation
Add the following line to your Cargo.toml file:
[]
= "1.0"
Data Types
Row is defined in the rline_api. It is the base item in data processing.
The function encapsulated by the macro takes a Row as parameter.
It returns a Result<Row, String> with the produced Row in case of success or an error message in case of failure.
Examples
Default format
use Row;
use Value;
use rline_bindgen;
/// Transform each string value to uppercase using
/// the default serialization format.
Explicitly specify the json format
use Row;
use Value;
use rline_bindgen;
/// Repeat one time each string value using
/// the json serialization format.
Explicitly specify the bincode format
use Row;
use Value;
use rline_bindgen;
/// Transform each string value to to_lowercase using
/// the bincode serialization format.
Attribution
This crate is inspired from wasmedge-bindgen, https://github.com/second-state/wasmedge-bindgen,
under the MIT/Apache v2 license.