diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000..04effb7 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,20 @@ +{ + "name": "dev", + "image": "mcr.microsoft.com/devcontainers/base:debian", + "customizations": { + "vscode": { + "extensions": [ + "StarkWare.cairo1", + "tamasfe.even-better-toml", + "rust-lang.rust-analyzer" + ] + } + }, + "features": { + "ghcr.io/devcontainers/features/rust:1": { + "version": "stable" + } + }, + "postCreateCommand": "bash .devcontainer/install-tools.sh", + "remoteUser": "vscode" +} diff --git a/.devcontainer/install-tools.sh b/.devcontainer/install-tools.sh new file mode 100644 index 0000000..80fa65b --- /dev/null +++ b/.devcontainer/install-tools.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -e + +echo "🚀 Setting up development environment..." + +# Install dependencies +apt-get update && apt-get install -y curl git build-essential + +# Install asdf +git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 +echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc +echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc +. ~/.asdf/asdf.sh + +# Add and install plugins +asdf plugin add scarb || true +asdf install scarb 2.10.1 +asdf global scarb 2.10.1 + +asdf plugin add dojo https://github.com/dojoengine/asdf-dojo || true +asdf install dojo 1.5.0 +asdf global dojo 1.5.0 + +asdf plugin add starknet-foundry || true +asdf install starknet-foundry 0.35.0 +asdf global starknet-foundry 0.35.0 + +echo "✅ Environment ready!"