Installation
To start writing CosmWasm (cw) smart contracts, you will need Rust installed on your machine.
You can install it by following the instructions on the official Rust website. https://www.rust-lang.org/tools/install
CosmWasm uses idiomatic Rust compiled to WebAssembly (wasm32-unknown-unknown
),
you will need the Wasm rust compiler backend installed to build Wasm binaries.
To install it, run:
rustup target add wasm32-unknown-unknown
CosmWasm Template
If you are looking to quickly bootstrap a blank CosmWasm contract, the Official CosmWasm/cw-template is the place to start.
To get started, install cargo-generate and cargo-run-script.
cargo install cargo-generate --features vendored-openssl
cargo install cargo-run-script
Now, use it to create your new contract. Go to the folder in which you want to place it and run:
cargo generate --git https://github.com/CosmWasm/cw-template.git --name PROJECT_NAME
Head over to CosmWasm/cw-template/README.md for the rest of the instructions.
Next Steps
Last updated on