Skip to content

Colin Webb

Tag: #rust

AWS Bedrock with Rust

AWS Bedrock is a fully-managed service that provides LLM interactions and has models from lots of leading organisations. In my opinion, it's a great way to get started with LLMs if you're using AWS since there's no worry about infrastructure scaling.

This post is a short description of how to get AWS Bedrock responding to your Rust code. It's a simple example, but should point the way forward for more complex interactions.

Simple Monte Carlo Simulation in Rust

Monte Carlo simulations are often used model the probability of different outcomes. They work by generating random values, passing them into a model, and then averaging the results.

The simplest Monte Carlo simulation, and a great way to start, is by using the technique to estimate the value of Pi.

Using Github Actions for building Rust Docker Images on ARM

Setting up CI for Rust with Github Actions is pretty easy, but there are a few gotchas.

This post will walk through setting up a basic CI pipeline for a Rust project, cross-compile to ARM, and build a Docker image.

I like to deploy hobby-projects on ARM as it is usually cheaper, and I have a Macbook so there's less cross-compilation to do.

We'll follow a pattern of building Rust, and then copying the binary into a Docker image. There are other patterns, such as building inside Docker using multi-stage builds, but there are unresolved issues with caching. This way is simpler, and works well.

AWS Lambda with Rust

AWS Lambda has supported custom runtimes using Docker images for a long time now. Any language that can run in Docker, can run in AWS Lambda. Therefore, we can write AWS Lambda functions in Rust - a fun, and fast, language.

This quick guide gets you deploying a Rust Lambda using the AWS CLI.