Overview of CosmWasm packages
masterCosmWasm provides WebAssembly smart contracts for the Cosmos SDK. The ecosystem is divided into packages for contract development, building, and execution.
Standard Library (Compiled into Wasm)
cosmwasm-std: Provides bindings and imports needed to build a smart contract.cosmwasm-storage: Optional addition tocosmwasm-stdproviding convenience helpers for storage.cw-storage-plus: A more powerful alternative tocosmwasm-storage(part ofcosmwasm-plus) supporting composite primary keys, secondary indexes, and automatic snapshotting. Recommended for modern contracts.
Building Tools
cosmwasm-template: A starter pack for quickly building custom contracts with a configured build environment.cosmwasm-plus: Provides sample contracts and usable primitives for tokens (CW20, CW721, CW1155), multisigs, and governance.rust-optimizer: A Docker image/script to produce the smallest possible deterministic Wasm output for deployment and verification.serde-json-wasm: A custom JSON library (fork ofserde-json-core) that avoids non-deterministic floating-point instructions and reduces code size by ~40%.
Execution Environments
cosmwasm-vm: Uses thewasmerengine to execute contracts, handling gas metering, storage, and caching.wasmvm: High-level Go bindings forcosmwasm-vmto upload, instantiate, and execute contracts.wasmd: A Cosmos SDK application designed to host Wasm contracts. It can be used as-is or itsx/wasmmodule can be imported into other blockchains.