kowaremonoid/rust-serverless

serverless AWS Rust template

A sample template for bootstrapping serverless framework cli

A sample template for bootstrapping Rustlang AWS Lambda applications with ⚡ serverless framework ⚡.

✨ features

  • 🦀 Build Rustlang applications targeting AWS Lambda with ease
  • 🛵 Continuous integration testing with GitHub Actions
  • 🚀 Continuous deployment with GitHub Actions
  • 🧪 Getting started unit tests

📦 install

Install the serverless framework cli.

Then then run the following in your terminal

$ npx serverless install \
  --url https://github.com/softprops/serverless-aws-rust \
  --name my-new-app

This will download the source of a sample Rustlang application and unpack it as a new service named "my-new-app" in a directory called "my-new-app"

🧙 how to be a wizard

Assuming you have aws credentials with appropriate deployment permissions configured (if you already use any existing AWS tooling installed you likely already have this configured), you can impress your friends by creating a project that is born in a production environment.

$ npx serverless install \
  --url https://github.com/softprops/serverless-aws-rust \
  --name my-new-app \
  && cd my-new-app \
  && npm ci \
  && npx serverless deploy

npm ci will make sure npm dependencies are installed based directly on your package-lock.json file. This only needs run once. The first time you run npx serverless deploy this project will pull down and compile the base set of dependencies and your application. Unless the dependencies change afterwards, this should only happen once, resulting in an out of the box rapid deployment cycle.

🛵 continuous integration and deployment

This template includes an example GitHub actions configuration file which can unlock a virtuous cycle of continuous integration and deployment ( i.e all tests are run on prs and every push to master results in a deployment ).

GitHub actions is managed simply by the presence of a file checked into your repository. To set up GitHub Actions to deploy to AWS you'll need to do a few things

Firstly, version control your source. Github is free for opensource.

$ git init
$ git remote add origin [email protected]:{username}/{my-new-service}.git

Store a AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY used for aws deployment in your repositories secrets https://github.com/{username}/{my-new-service}/settings/secrets

Add your changes to git and push them to GitHub.

Finally, open https://github.com/{username}/{my-new-service}/actions in your browser and grab a bucket of popcorn 🍿

🔫 function triggering

With your function deployed you can now start triggering it using serverless framework directly or the AWS integration you've configured to trigger it on your behalf

$ npx serverless invoke -f hello -d '{"foo":"bar"}'

🔬 logs

With your function deployed you can now tail it's logs right from your project

$ npx serverless logs -f hello

👴 retiring

Good code should be easily replaceable. Good code should also be easily disposable. Retiring applications should be as easy as creating and deploying them them. The dual of serverless deploy is serverless remove. Use this for retiring services and cleaning up resources.

$ npx serverless remove

ℹ️ additional information

  • See the serverless-rust plugin's documentation for more information on plugin usage.

  • See the aws rust runtime's documentation for more information on writing Rustlang lambda functions

👯 contributing

This template's intent is to set a minimal baseline for getting engineers up an running with a set of repeatable best practices. See something you'd like in this template that would help others? Feel free to open a new GitHub issue. Pull requests are also welcome.

Information - Updated Dec 26, 2021

Stars: 0
Forks: 0
Issues: 0

Run ONNX and TensorFlow inference in the browser

A thin wrapper on top of Open Neural Network Exchange is a format which many popular libraries like PyTorch, TensorFlow and MXNet can export to...

Run ONNX and TensorFlow inference in the browser

Run sonicbot_rust once to generate a blank config file named conf

Then fill out the config file and run sonicbot_rust again

Run sonicbot_rust once to generate a blank config file named conf

egui bindings for miniquad

On Linux you first must run apt install libx11-dev libxi-dev libgl1-mesa-dev (miniquad dependencies)

egui bindings for miniquad
Game

346

Run any Windows program through Valve's Proton

Run any Windows program through Usage

Run any Windows program through Valve's Proton

Run cargo build to install all dependencies

Run cargo run to play the game

Run cargo build to install all dependencies

Yew Styles is a style framework for yew without JavaScript dependencies

CssinRust or Run the documentation page

Yew Styles is a style framework for yew without JavaScript dependencies

A dashboard to update your dependencies

To run the whole thing for development (requires see steps here on how to create one)

A dashboard to update your dependencies

Run Actix web, Rocket, Warp on AWS Lambda

API Gateway HTTP API with Amazon Linux 2 custom runtime or Docker container image

Run Actix web, Rocket, Warp on AWS Lambda

Run your CLI programs as state machines with persistence and recovery abilities

program breaks you'll have opportunity to change the external world (create a missing folder,

Run your CLI programs as state machines with persistence and recovery abilities

Run JavaScript in WebAssembly

Now supporting wasmedge socket for HTTP requests and Tensorflow in JavaScript programs!

Run JavaScript in WebAssembly

Template for Svelte GUI and Actix-Web Server applications

Make sure to run npm install to download all dependencies

Template for Svelte GUI and Actix-Web Server applications
Facebook Instagram Twitter GitHub Dribbble
Privacy