A comprehensive CLI development environment for Arbitrum Stylus smart contracts with automated gas profiling
npm install stylus-toolkitThe easiest way to build Arbitrum Stylus smart contracts in Rust.





Build, deploy, and profile Stylus contracts with simple commands. No Docker required - works with testnets out of the box!
- š One-command project setup - 4 ready-to-deploy templates
- š¦ Built-in WASM compiler - Automatic Rust to WebAssembly compilation
- ā” Gas profiling - Compare Rust vs Solidity gas usage
- š Network support - Local, testnet, and mainnet configurations
- š³ Docker optional - Use testnets for development (no Docker needed!)
- š Multiple export formats - JSON, CSV, HTML reports
``bash1. Install
npm install -g stylus-toolkit
That's it! Your contract is ready to deploy.
No Docker? No problem! Deploy to testnet directly:
`bash
stylus-toolkit config --set defaultNetwork=arbitrum-sepolia
`š Prerequisites
Required:
- Node.js 16+ (Download)
- Rust (Install)
Optional:
- Docker (only if you want local node) (Download)
Most developers use testnet and don't need Docker!
š Documentation
- Quick Start Guide - Complete tutorial from zero to deployment
- Cheat Sheet - All commands at a glance
- Troubleshooting - Common issues and solutions
š ļø Commands
$3
Initialize a new Stylus project.
`bash
stylus-toolkit init [options]Options:
-n, --name Project name
-t, --template Template (basic, erc20, erc721, defi)
--rust-only Rust only
--solidity-only Solidity only
`$3
Profile and compare gas usage.
`bash
stylus-toolkit profile [options]Options:
-c, --contract Contract name
-r, --rpc RPC endpoint
-n, --network Network (local, arbitrum-sepolia, arbitrum-one)
--export Export format (json, csv, html)
--detailed Show detailed breakdown
`$3
Manage configuration.
`bash
stylus-toolkit config [options]Options:
--set Set config value
--get Get config value
--list List all config
--reset Reset to defaults
`Example Output
`
āāāāāāāāāāāāāā¬āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāā¬āāāāāāāāāāā¬āāāāāāāāā
ā Metric ā Rust ā Solidity ā Savings ā % ā
āāāāāāāāāāāāāā¼āāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāā¤
ā Deployment ā 120,456 ā 845,231 ā 724,775 ā 85.75% ā
ā increment ā 2,341 ā 43,892 ā 41,551 ā 94.67% ā
āāāāāāāāāāāāāā“āāāāāāāāāāāāāāā“āāāāāāāāāāāāāāā“āāāāāāāāāāā“āāāāāāāāā
`Configuration
Default networks:
- Local:
http://localhost:8547
- Arbitrum Sepolia: Testnet
- Arbitrum One: MainnetAdd custom networks:
`bash
stylus-toolkit config --set networks.custom.rpcUrl=https://your-rpc.com
`Project Structure
`
my-project/
āāā contracts-rust/
ā āāā src/lib.rs
āāā contracts-solidity/
ā āāā Contract.sol
āāā .stylus-toolkit/
āāā README.md
`Development
`bash
git clone https://github.com/soloking1412/stylus-toolkit.git
cd stylus-toolkit
npm install
npm run build
``MIT