Skip to content

An example OpenFaaS function using the rust-warp template

Notifications You must be signed in to change notification settings

austinrivas/openfaas_rust-warp_func

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenFaaS Rust Warp HTTP function

An OpenFaaS of-watchdog function written for Rust Warp server.

Installation

faas template pull https://github.com/austinrivas/rust-warp-template

Create Function

faas new <name> --lang rust-warp

Testing

cargo test --manifest-path ./function/Cargo.toml

Format

cargo fmt --manifest-path ./function/Cargo.toml

Linting

cargo clippy --manifest-path ./function/Cargo.toml

Deployment

faas up -f function.yml --gateway $GATEWAY_URL

Remote Dev

This function includes an okteto.yml function to facilitate remote dev and debugging.

cd function
okteto up
 ✓  Development environment activated
 ✓  Files synchronized
    Namespace: austinrivas
    Name:      rust-hello
    Forward:   8080 -> 8080
               9229 -> 9229
okteto> fwatchdog

This will compile the function in the remote dev environment. Rust is fast code that compiles slow, so patience is a virtue here. Okteto will cache the build so that later compilations will be much faster.

Okteto will syncronize local changes with the remote environment.

Currently remote debugging is not implemented, however it is a future goal of this project.

This function is based on the OpenFaaS rust-warp-template.

This template provides a thin wrapper around the Rust Warp Server.

Extras

This repo also contains an Okteto Remote Development Configuration for use on the Okteto Platform.

A github action is included that will trigger on pull request. This action runs the rust tests / lint / check / format.

About

An example OpenFaaS function using the rust-warp template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages