Rust Cannon Template 🦀 💣 💥

Overview

Rust Cannon Template 🦀 💣 💥

This repo contains a build system and a minimal Rust program for building MIPS binaries that are executable in the context of Optimism Cannon.

It comes with a few barebones helpers for reading the input hashes, writing output and using the pre-image oracle.

It is intended to be used as a template with cargo generate e.g.

cargo generate willemolding/rust-cannon-template

Usage

The template uses Docker for cross-compiling MIPS on any host. First build the docker image by running:

make docker_image

After this a Cannon ready MIPS binary can be build with:

make build

This will write an out.bin file to the build directory.


Alternatively if you want to experiment in the build environment you can load up an interactive shell with

make docker_image
docker run -it --rm -v $(pwd):/code {{project-name}}/builder bash

(replace with your project name as required)

and from there you can run

./build.sh

to produce the output

Credits

The majority of this amazing work was done by @pepyakin in their Cannon fork. This just pulls out the relevant pieces and adds a few quality of life improvements to the build system.

You might also like...
A template for developing Rust projects, with sensible defaults

Rust Template A template for developing Rust projects, with sensible defaults. Getting Started Click the Use this template button at the top of the pa

LLM-chain Rust Template Repository

Jumpstart your llm-chain projects with the llm-chain-template repository! This template provides a foundation for using the llm-chain library, complete with example code and instructions to get you started effortlessly.

A github rust workflows template, just want to focus on coding

rust-template A github rust workflows template, just want to focus on coding. Demo template GitHub Actions Workflow file Table of contents Features Us

Generate Nice Solana Address By Template

Yes, I know about GPU generators. https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4 ./solana-nice-address --help solana-nice-

Substrate Node Template Generator

Substrate Node Template Generator A tool to generate stand-alone node templates of a customized Substrate clients used in "Substrate Library Extension

A template for AVR executable (non-library) projects

Rust AVR executable template A template for Rust based AVR executables. NOTE: This software template repository is offered in the public domain. It is

This is solana program template.

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Crib - Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

Owner
Willem Olding
Willem Olding
A blazing fast, type-safe template engine for Rust.

markup.rs A blazing fast, type-safe template engine for Rust. markup.rs is a template engine for Rust powered by procedural macros which parses the te

Utkarsh Kukreti 209 Dec 24, 2022
This is a template to build secret contracts in Rust to run in Secret Network

Secret Contracts Starter Pack This is a template to build secret contracts in Rust to run in Secret Network. To understand the framework better, pleas

Ethan Gallucci 1 Jan 8, 2022
A template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

null 1 Mar 7, 2022
🖨 Template for Rust applications & smart contracts @okp4.

Rust Template Template for Rust projects @okp4. Purpose & Philosophy This repository holds the template for building Rust projects with a consistent s

OKP4 – Open Knowledge Protocol For 6 Nov 17, 2022
Minimal compile-time Rust template engine

boilerplate boilerplate is a minimal compile-time Rust text template engine. Quick Start Add boilerplate to your project's Cargo.toml: [dependencies]

Casey Rodarmor 15 Dec 30, 2022
A template for your next Rust project.

Opinionated Rust Template A template for your next Rust project. To start coding run: cargo generate tomkarw/opinionated-rust-template Only requires j

Tom Karwowski 8 Dec 1, 2022
Cloup is a template manager that provides the files you desire when you need them, written in Rust.

cloup cloup is a template manager that delivers the files you desire when you need them, written in rust you no longer need to locate your previous pr

Benjamin Akar 62 Dec 5, 2022
A template for command-line Rust programs

This is a template for command-line Rust programs. Clone and run the rename script with both a lowercase and UpperCase name. In the dev profile, depen

ludios 2 Oct 3, 2022
Rust-Rocket framework template Demo

rocketapp Rust-Rocket framework template Demo dependencies are defined in Cargo.toml Clone as: git clone https://github.com/srikantgdev/rocketapp [op

Srikant Gudi 3 Oct 27, 2022
A template for writing CMSIS-Pack flash algorithms in Rust

Flash Algorithm Template This is a flash algorithm template for writing CMSIS-Pack flash algorithms in Rust. It can be used to generate new flash algo

probe.rs 5 Feb 11, 2023