Small experiments in writing Rust programs to perform specific tasks. Clone the repository and use cargo run
with the -p <crate name>
flag to run one of programs.
- Error Handling - Basic experiments using Rust Errors.
- Interior Mutability - Experiments using RefCell to avoid the borrow checker.
- Interior Mutability Threaded - Using Arc and Mutex to replace RefCell when using threads.
- More Error Handling - More experiments with Rust Errors and the
thiserror
crate. - Options - Experiments using Rust Option enums and their methods.
- WASM Plugin - A WASM plugin in Rust that is loaded into a host Rust program using Wasmtime, also shows how to read a string returned from a WASM function.
- Write File - Writing a file and setting its permissions.
- Parsing TOML - Read values from a TOML formatted file using
serde
. - Reedline - Reading from the terminal with
reedline
. - REPL - Create a Read, Eval, Print, Loop (REPL) interface using
reedline-repl-rs
. - Rusqlite - Experiments using
rusqlite
.
GitHub and documentation.
- Create Bucket - Create and tag an S3 Bucket, then delete it.
- Create VPC - Create a VPC with Subnets spread across different Availability Zones.
- List Buckets - List all the S3 Buckets in an account.
- AWS Profile - Choose which AWS Credentials profile to use.
- AWS VPC - Tagging and describing VPCs.
- Create Instance - Create an EC2 Instance and all the support VPC and IAM bits.
- Create Instance Profile - Create an Instance Profile with a Role and Trust Policy.
- Default VPC Security Groups - Security Group tests using the default VPC.
- Inspect VPC - Describe the details of a VPC.
- Internet Gateway - Create a VPC with an Internet connection using an Internet Gateway.
- S3 File Upload - Create an S3 bucket and upload a file.
- S3 Gateway Endpoint - Create a VPC containing an S3 Gateway Endpoint.
- Security Groups - Create security groups and create trust between them.
- SQS - Create, delete, describe, and send messages to SQS queues.
- VPC Filter - Describe a VPC based on it's tags.
GitHub and documentation.
- Axum Basics - Basic routing and HTTP methods.
- Axum WS Ping - A WebSocket ping server using Axum.
- Axum JavaScript Messages - Axum WebSocket server with JavaScript messages.
- Axum JWT - Authentication in Axum using JWTs.
- Axum WS Auth - WebSocket authentication in Axum using JWTs.
- Axum Errors - Returning errors when Axum handlers fail.
GitHub and documentation.
- Argument Parsing - Basic Clap argument parsing.
- Positional Arguments - Experiment with Clap positional arguments.
- Subcommands - Experiment with Clap subcommands and args.
Github and documentation.
- NATS Basic - Basic pub/sub using NATS.
Copyright 2023, Keith Sharp, [email protected].
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.