Skip to content

amphitheatre-app/solana-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amphitheatre for Solana

Instantly spin up fresh, automated dev environments in the cloud and start developing within seconds.

About

Amphitheatre is an open-source developer platform designed to assist developers in quickly launching new automated development environments in the cloud. It provides on-demand, pre-configured tools, libraries, and dependencies, ensuring you can start coding immediately. You can edit your application source code locally, and Amphitheatre will automatically incrementally deploy your changes to a Kubernetes cluster, making the transition between local development and remote deployment smoother and more efficient.

For more information, please see the official website: https://amphitheatre.app

Features

  • No dependencies No need to configure the local development environment and support for multiple programming languages and frameworks.
  • Unlimited isolation environments Rapidly generate countless isolated integration test environments without any limitations, streamlining the test process and reducing costs
  • Multi-component applications Supports applications with multiple components, ideal for microservices-based applications and collaborative multi-person development.
  • Live Update Lets you skip image builds altogether and update running containers with new code in seconds instead of minutes.
  • Integrations Integrate development, testing, deployment, and other tools to create a comprehensive software integration solution, automating workflow processes to streamline software development.
  • Snapshots Snapshots lets you share your dev environment and collaborate on issues as quickly as looking at the monitor next to you.

Special support for Solana

Amphitheatre supports dozens of popular languages, development frameworks and IaC platforms. Specifically, Amphitheatre offers the following support for the Solana project:

  • Native - Written using Solana's native Rust crates and vanilla Rust.
  • Anchor - Written using Anchor's anchor_lang Rust crate and the associated Anchor framework to build & deploy.
  • Seahorse - Written using the Python framework Seahorse, which converts your Python code to Anchor Rust.
  • C/C++ - Writing on-chain programs using the C and C++ programming languages.
  • Solang - Written using Solang programming languages.

In addition, a testnet is automatically deployed locally (optional).

Examples

In order to demonstrate what Amphitheatre can do, we have selected the following projects from the official and related sample projects for testing. These range from simple projects (such as Hello, World) to more complete projects (such as Break Solana Game with multiple components).

Native - Hello Solana

Native - Break Solana Game

Breakis a React app that gives users a visceral feeling for just how fast and high-performance the Solana network really is. The Break Solana Game consists of a 3 parts: a web client frontend, a web server backend, and an on-chain Solana program. The web server backend is not strictly required but it helps with certain performance improvements.

Anchor - Create Account

Anchor - Tic-Tac-Toe

Seahorse - Transfer SOL

A simple example of transferring SOL between two system accounts. You can transfer SOL between many types of accounts, not just system accounts (owned by the System Program).

Program examples written in C

Solang - Account Data

How to build & deploy

Just like the other Amphitheatre examples, after installing the server and CLI software, and configuring the certificates and preferences, follow these steps:

  1. Clone the code:

    git clone https://github.com/amphitheatre-app/solana-examples.git
  2. Go to the appropriate project directory, e.g. hello-solana:

    cd ./solana-examples/hello-solana/
  3. Execute the following command:

    amp run

License

Copyright (c) The Amphitheatre Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.