sutils 0.1.0

Utilities for writing Solana programs
Documentation
  • Coverage
  • 82.5%
    33 out of 40 items documented0 out of 31 items with examples
  • Size
  • Source code size: 68.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.18 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 40s Average build duration of successful builds.
  • all releases: 40s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • bonedaddy/solana-utils
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bonedaddy

Rust Template

Template repository for creating new rust projects including a CLI and YAML based configuration management.

  1. Features
  2. Usage
    1. Linting
    2. Docker
      1. Prerequisites
      2. Building

Features

  • CLI
  • Configuration management
  • Docker image tooling
  • Lint script (cargo fmt + clippy)
  • GitHub Actions integration

Usage

After cloning this repository there are a few things you'll likely want to change:

  • The name of the tag used when building the docker images (edit the Makefile)
  • Rust toolchain version (edit rust-toolchain.toml)
  • If changing the rust toolchain version also update the version in [./github/workflow/ci.yml]

Linting

The lint script rust runs cargo fmt, and then cargo clippy --fix. To run the script

$> ./scripts/lint.sh

Docker

The dockerfile's are optimized to minimize compilation times by using multi-stage builds and cargo chef to cache dependency compilation. The final build stage trims as much as possible to minimize the final image size.

Prerequisites

Requires that you have the BuildKit plugin installed.

Building

There are two image files

  • Dockerfile can be used to build the CLI in release mode
  • Dockerfile.dev can be used to build the CLI in debug mode

To build the release docker image

$> make build-docker-release

To build the debug docker image

$> make build-docker-debug