Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dev-learning-lab

A clean, local workspace for studying Go and Rust side by side — without the overhead of a production monorepo.


Purpose

  • Build muscle memory in both languages at the same time.
  • Keep exercises isolated and browsable by topic.
  • Enforce good habits (lint, fmt, tests) from day one.
  • Grow naturally as you learn more advanced topics.

Folder structure

dev-learning-lab/
├── README.md              ← you are here
├── Makefile               ← single entry point for all commands
├── .gitignore
├── .editorconfig          ← consistent formatting across editors

├── go/                    ← Go learning workspace
│   ├── go.mod             ← module: learning/*
│   ├── .golangci.yml      ← linter config
│   ├── basics/            ← variables, structs, error handling
│   ├── concurrency/       ← goroutines, channels, select
│   ├── backend/           ← HTTP server, JSON, middleware
│   └── playground/        ← free-form scratch space

├── rust/                  ← Rust learning workspace
│   ├── rust-toolchain.toml
│   ├── clippy.toml
│   ├── basics/            ← structs, enums, iterators, tests
│   ├── ownership/        ← ownership, borrowing, lifetimes, Rc
│   ├── async/             ← async/await, tokio, channels
│   ├── smart-contracts/   ← Solana / anchor study (placeholder)
│   └── playground/        ← free-form scratch space

└── scripts/
    ├── bootstrap.sh       ← check tools, init modules
    ├── lint.sh           ← run linters
    ├── format.sh         ← run formatters
    └── test.sh           ← run tests

Required tools

Tool Why Install
Go 1.22+ Language https://go.dev/dl or brew install go
rustup / Cargo Language toolchain https://rustup.rs
golangci-lint Rich Go linter brew install golangci-lint
rustfmt Rust formatter rustup component add rustfmt
clippy Rust linter rustup component add clippy

First-time setup

# 1. Enter the workspace
cd dev-learning-lab

# 2. Check what is and isn't installed
make bootstrap
#  — prints friendly instructions if anything is missing

# 3. Install the missing tools, then re-run bootstrap
bash scripts/bootstrap.sh

Day-to-day commands

make help          # show all available targets

make fmt           # format Go + Rust
make lint          # lint Go + Rust
make test          # run all tests

# Language-specific targets
make go-fmt        make go-lint        make go-test
make rust-fmt      make rust-lint       make rust-test

Adding a new Go exercise

  1. Create a topic folder:
    mkdir go/mypattern
  2. Add your Go files:
    cd go/mypattern
    # write your .go files
  3. Initialise the Go module:
    go mod init learning/mypattern
  4. Format and check:
    make go-fmt
    make go-lint
    make go-test

Adding a new Rust exercise

  1. Create a topic folder:
    mkdir rust/mypattern
  2. Initialise a Cargo project:
    cd rust/mypattern
    cargo init --name mypattern
  3. Add dependencies to Cargo.toml as needed.
  4. Write your src/main.rs (or src/lib.rs for a library).
  5. Format and check:
    make rust-fmt
    make rust-lint
    make rust-test

VS Code — recommended extensions

Go

  • Go (golang.go) — official extension; adds gofmt, vet, lint, test runner
  • Go Test Lens — inline test run buttons
  • Error Lens — inline error highlighting

Rust

  • rust-analyzer — language server (hover, completions, inlay hints, refactoring)
  • rust-test-adapter — test explorer sidebar
  • Even Better TOML.toml file editing support
  • Crates — shows latest version of dependencies in Cargo.toml

General

  • EditorConfig for VS Code — reads .editorconfig
  • Shellcheck — shell script linting

Exercise naming convention

Recommended pattern for daily exercises:

<lang>/<topic>/e<NN>_<short_description>.go
<lang>/<topic>/e<NN>_<short_description>.rs

Examples:

go/basics/e01_variables.go
go/basics/e02_functions.go
go/concurrency/e01_goroutines.go
rust/ownership/e01_move_semantics.rs
rust/async/e01_first_await.rs

This keeps exercises ordered, searchable, and easy to review in a folder sort.


rust/smart-contracts — Solana study plan

This folder is a placeholder. Here is how to grow it when you're ready.

Recommended toolchain

Tool Purpose
Solana CLI Deploy and interact with devnet/localnet
Anchor (@coral-xyz/anchor) IDL-driven smart contract framework
Rust SDK (solana-sdk) Low-level program development
solders Keypair and transaction helpers

Phased study plan

smart-contracts/
├── 01_solana-core/         # accounts, programs, transactions
├── 02_token-program/       # SPL tokens, minting, transfers
├── 03_pdas/                # Program Derived Addresses
├── 04_anchor-basics/       # workspace, accounts, errors
├── 05_multisig/            # DAO treasury patterns
├── 06_oracle-integration/  # Pyth price feeds
└── playground/             # scratch space for experiments

Getting started with Anchor

# Install anchor
npm install -g @coral-xyz/anchor-cli

# Bootstrap a new program
cd rust/smart-contracts/04_anchor-basics
anchor init my-program --rust

# Build
anchor build

Anchor Rust programs live under programs/<name>/src/lib.rs and mirror the folder structure above.


Principles

  • Beginner-friendly — commands are simple, output is readable.
  • No heavy toolingmake and bash are enough.
  • Fail fast, warn gently — scripts skip uninitialised folders with a warning instead of crashing.
  • Self-contained — each language workspace is fully independent.
  • Optimised for review — folder names and file naming make it trivial to find and revisit any concept.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages