A Browser-Based Smart Contract Playground for the Casper Blockchain
Casper Web IDE is a fully browser-based development environment inspired by Ethereum's Remix IDE, but purpose-built for the Casper Network. It allows developers to write, compile, deploy, test, and debug Casper smart contracts directly in the browser—without installing Rust, cargo-casper, or any command-line tools.
The IDE supports Rust and AssemblyScript smart contracts, providing a smooth, beginner-friendly onboarding flow while remaining powerful enough for advanced developers.
- Syntax highlighting for Rust & AssemblyScript
- Monaco Editor-powered workspace
- Multiple file tabs
- Real-time error highlighting
- Rust smart contracts compiled to .wasm using WebAssembly-enabled toolchains
- AssemblyScript contracts compiled using AS → WASM pipeline
- No local environment setup required
- Deploy compiled WASM to Casper testnet
- Connect wallet (Casper Wallet / Ledger / Casper Signer)
- Configure values, entrypoints, gas, and runtime arguments
- View deploy hash + stored contract hash
- Run contract entrypoints directly from the UI
- Auto-generated UI controls for arguments
- View transaction status, logs, and stored values
- WASM bytecode viewer
- Contract metadata inspector
- Deploy visualization
- Import sample Casper tutorials
- Save contract workspace locally
- Export compiled WASM artifacts
Casper Web IDE
│
├── Frontend (Next.js / React)
│ ├── Monaco Editor
│ ├── Rust & AS syntax plugins
│ ├── File system sandbox
│ └── WASM compiler runners
│
├── WASM Build Engine (Browser)
│ ├── rustc/cargo-wasm (WebAssembly port)
│ ├── AssemblyScript compiler
│ └── wasm-opt for optimization
│
├── Casper SDK Layer
│ ├── casper-js-sdk
│ ├── deploy builders
│ └── signing integrations
│
└── Optional Backend (Node.js)
├── template storage
├── analytics
└── contract examples
/casper-web-ide
│
├── public/
├── src/
│ ├── components/
│ │ ├── Editor/
│ │ ├── Compiler/
│ │ ├── DeployPanel/
│ │ └── OutputConsole/
│ ├── pages/
│ ├── utils/
│ ├── compilers/
│ │ ├── rust-wasm/
│ │ └── as-wasm/
│ └── services/
│ └── casper/
│
├── examples/
│ ├── counter-rust/
│ └── ft-assemblyscript/
│
└── README.md
| Component | Technology |
|---|---|
| Editor | Monaco Editor |
| Frontend | Next.js + React |
| Language Support | Rust, AssemblyScript |
| Contract Deployment | casper-js-sdk |
| WASM Compilation | Rust WebAssembly toolchain + AS compiler |
| Storage | Local browser sandbox |
git clone https://github.com/yourusername/casper-web-ide.git
cd casper-web-ide/IDEnpm installCreate a .env file in the IDE folder:
cp .env.example .envEdit .env and add:
GEMINI_API_KEY- Your Google Gemini API key (optional, for AI assistant)VITE_COMPILER_SERVICE_URL- Your GCP compilation service URL
Example:
GEMINI_API_KEY=your_gemini_api_key_here
VITE_COMPILER_SERVICE_URL=http://34.93.123.45:8080Note: For real Rust compilation, you need to set up a GCP VM with the compilation service. See
GCP_SETUP.mdfor detailed instructions.
npm run devNavigate to: http://localhost:3000
- Go to Examples panel
- Select Counter (Rust)
- Click Compile
- Connect Casper Wallet
- Hit Deploy