Welcome to the Gno Workshop repository! This is designed to help you learn Gno by providing a series of exercises that cover various aspects of Gno development.
First, fork this repository, allowing you to push your progress to your own copy.
The preconfigured devcontainer in this repository provides a convenient way to set up your development environment in no time. It includes all the necessary tools and configurations to start working on Gno exercises.
You can use the devcontainer in two ways: in the cloud or locally.
Launch a fully-featured cloud-based IDE in one click using GitHub Codespaces:
You can also run the devcontainer locally using Visual Studio Code and Docker by following these steps:
- Install and configure Docker on your machine.
- Install Visual Studio Code.
- Install the Dev Containers extension for Visual Studio Code.
- Clone your forked repository to your local machine and open it in Visual Studio Code.
- When prompted, click on
Reopen in Containerto start building the devcontainer or open the command palette (Ctrl+Shift+P or Cmd+Shift+P) and selectDev Containers: Reopen in Container. - Wait for the container to be ready to start. This may take a few minutes on the first run.
Once the devcontainer is set up, you can start working on the exercises by opening the Gnodev panel. You can do this in two ways:
- Click on the
Gnodevicon in the top right corner of Visual Studio Code. - Or open the command palette (Ctrl+Shift+P or Cmd+Shift+P) and type
Gno: Start Gnodev Server.
Happy coding!
If you prefer to set up the your development environment locally without using the devcontainer, you will need to install the following prerequisites:
- make to run commands defined in the Makefile.
- Go 1.23+ to compile Gno tools.
Then, follow these steps:
- Clone the repository to your local machine and navigate to the project directory:
git clone https://github.com/<your_username>/gno-workshop.git
cd gno-workshop- Install the Gno tools:
make install_tools- Optionally, you can install and configure the Gno LSP server for your editor, see gnoverse/gnopls for more details.
- Start the Gno development server by running:
make dev- Open your web browser and navigate to http://localhost:8888 to access the Gno web interface and browse the exercises.
The Makefile contains various commands to help you with development, such as make test to run tests or make lint to lint your Gno code. Use make help to see a list of available commands.