Example WASM User Defined Function (UDF) for Seafowl in Rust.
For more information on Seafowl WASM support read this blog post.
A blogpost describing the project which uses this code can be found here.
To create your own Seafowl UDFs in Rust, fork this example repository.
First install Rust and Cargo, then install cargo-wasi by running:
cargo install cargo-wasi
cargo wasi build --release
This repository includes the create_udf.sh
shell script which creates the Seafowl function wrapping the Rust WASM logic.
# Start seafowl
SEAFOWL__FRONTEND__HTTP__WRITE_ACCESS=any ./target/release/seafowl
# In another terminal tab/window, run
./create_udf.sh
Invoking the newly created UDF:
./query_udf.sh
cargo test