Skip to content

workbenchapp/solana-workbench

Repository files navigation

Solana Workbench

Solana Workbench is your one stop shop for local Solana development.

Deploy local validators, airdrop tokens, and more with its GUI on OSX and Windows. Solana development may be like chewing glass today, but we’re on a mission to change that forever.

Build dependencies

If you already have Node on your system (we recommend version 17), you can install the Node deps like so:

$ npm install

In order to use Anchor functionality, the anchor CLI must be installed. To connect to a local test validator, you can either run one yourself on the CLI, or use the Docker functionality via the app.

Detailed instructions:

NOTE: use bin/setup.sh for both Linux and OSX (but don't forget to add XCode cmdline tools for OSX) - it basically does the following

  • Nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  • Node (latest version): nvm install 16.15.0 and nvm use 16.15.0
  • Docker: curl -o- https://get.docker.com | bash
  • Yarn: corepack enable
  • Anchor CLI must be available in PATH to use Anchor stuff
    • from https://book.anchor-lang.com/chapter_2/installation.html
    • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • source $HOME/.cargo/env
    • sh -c "$(curl -sSfL https://release.solana.com/v1.9.9/install)"
    • cargo install --git https://github.com/project-serum/anchor avm --locked --force
    • avm use latest -- needed on Linux (needs libudev-dev)
    • Be sure to add $HOME/.avm/bin to your PATH to be able to run the installed binaries

Linux

to build the rust based tools (solana and anchor cli's), you will also need to install some native build tools and libraries. (See the Dockerfile for more)

  • Docker Desktop, or a working configured Docker setup
sudo apt-get install -yq curl libudev-dev git build-essential libssl-dev pkg-config

OSX

  • XCode Command Line Tools (if on OSX)
  • on OSX some path stuffing around, so solana and anchor binaries are in the path (for development)
  • Docker Desktop, or a working configured Docker setup
  • Add anchor and solana to your path (edit ~/.zshenv if you're using zsh):
. "$HOME/.cargo/env"

path+=("$HOME/.avm/bin")
path+=("$HOME/.local/share/solana/install/active_release/bin")

. "$HOME/.nvm/nvm.sh"

export PATH

Windows (native)

without anchor tooling for now

  • NVM for Windows
  • Node (latest version): nvm install 16.15.0
  • as Administrator nvm use 16.15.0
  • Yarn: corepack enable
  • npm install
  • Docker Desktop, or a working configured Docker setup

Run

to run:

$ npm run dev

Now you're working with Workbench!

Development

The project is currently in a migratory phase from Bootstrap to Tailwind. Do not write new code using Bootstrap layouting. Instead, opt for using Tailwind's atomic CSS system instead. The goal is to eventually be able to fully remove bootstrap from the codebase.

Building A Release

On each platform (OSX, Windows, Linux), run:

git clone https://github.com/workbenchapp/solana-workbench new-release-dir
cd new-release-dir
npm install
npm run package

To sign and notarize the OSX artifacts:

  1. You must have the correct certificates from developer.apple.com installed on the build computer.
  2. Signing will occur automatically during npm run package.
  3. Notarization requires three environment variables to be set:
    1. APPLE_NOTARIZATION=1 -- Indicate that the builds should be notarized
    2. APPLE_ID -- The email address associated with the developer Apple account
    3. APPLE_ID_PASS -- The app specific password for the app. This is different from the Apple ID's main password and set in the developer portal.

TODO: Add the signing steps for Windows.

Then upload binaries and latest*.yml files to the Github release.