Expand description
§Rust SDK for FastEdge.
The fastedge
crate is being split into two halves:
-
One half of the crate implements FastEdge WebAssembly component model and is intended for working with WebAssembly components. This API resides in the root of the
fastedge
crate’s namespace. -
The second half of the crate is for use with the ProxyWasm API. This implementation is present in
fastedge::proxywasm
.
An example of using FastEdge looks like:
use fastedge::body::Body;
use fastedge::http::{Request, Response, StatusCode};
#[allow(dead_code)]
#[fastedge::http]
fn main(_req: Request<Body>) -> Result<Response<Body>> {
let res = Response::builder()
.status(StatusCode::OK)
.body(Body::empty())?;
Ok(res)
}
Re-exports§
pub extern crate http;
Modules§
- body
- Helper types for http component
- dictionary
- Helper functions for dictionary interface
- exports
- gcore
- key_
value - FastEdge key-value persistent storage. This module provides an interface for key-value storage, which is implemented by the host.
- proxywasm
- FastEdge ProxyWasm module extension
- secret
- Helper functions for secret interface
- wasi_nn
Macros§
- export
- Generates
#[unsafe(no_mangle)]
functions to export the specified type as the root implementation of all generated traits.
Enums§
- Error
- Error type returned by
send_request
Functions§
- send_
request - implementation of http_client
Attribute Macros§
- http
- Main function attribute for a FastEdge application.