From bcf58e1a05c67e7b24fe2e399f519609e13e753a Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Wed, 20 Aug 2025 13:40:02 +0200 Subject: [PATCH 1/7] Added dependency diagram. --- README.md | 131 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 93 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index e9355c8ded..db1e00c50c 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,96 @@ # CosmWasm -[![CircleCI](https://circleci.com/gh/CosmWasm/cosmwasm/tree/main.svg?style=shield)](https://circleci.com/gh/CosmWasm/cosmwasm/tree/main) +![component][component-badge] +[![license][apache-badge]][apache-url] + +[component-badge]: https://img.shields.io/badge/CosmWasm-6343ae.svg +[apache-badge]: https://img.shields.io/badge/License-Apache%202.0-blue.svg +[apache-url]: LICENSE +[notice-url]: NOTICE **WebAssembly Smart Contracts for the Cosmos SDK** -## Packages - -The following packages are maintained here: - -| Crate | Usage | Download | Docs | Coverage | -| --------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------ | -| cosmwasm-crypto | Internal only | [![cosmwasm-crypto on crates.io](https://img.shields.io/crates/v/cosmwasm-crypto.svg)](https://crates.io/crates/cosmwasm-crypto) | [![Docs](https://docs.rs/cosmwasm-crypto/badge.svg)](https://docs.rs/cosmwasm-crypto) | [![Coverage][cov-badge-crypto]][cov-link-crypto] | -| cosmwasm-derive | Internal only | [![cosmwasm-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-derive.svg)](https://crates.io/crates/cosmwasm-derive) | [![Docs](https://docs.rs/cosmwasm-derive/badge.svg)](https://docs.rs/cosmwasm-derive) | [![Coverage][cov-badge-derive]][cov-link-derive] | -| cosmwasm-schema | Contract development | [![cosmwasm-schema on crates.io](https://img.shields.io/crates/v/cosmwasm-schema.svg)](https://crates.io/crates/cosmwasm-schema) | [![Docs](https://docs.rs/cosmwasm-schema/badge.svg)](https://docs.rs/cosmwasm-schema) | [![Coverage][cov-badge-schema]][cov-link-schema] | -| cosmwasm-core | Internal only | [![cosmwasm-core on crates.io](https://img.shields.io/crates/v/cosmwasm-core.svg)](https://crates.io/crates/cosmwasm-core) | [![Docs](https://docs.rs/cosmwasm-core/badge.svg)](https://docs.rs/cosmwasm-core) | [![Coverage][cov-badge-core]][cov-link-core] | -| cosmwasm-std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | [![Coverage][cov-badge-std]][cov-link-std] | -| cosmwasm-vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | [![Coverage][cov-badge-vm]][cov-link-vm] | -| cosmwasm-check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | `cosmwasm-check -h` | N/A | - -[cosmwasm-storage](https://crates.io/crates/cosmwasm-storage) is no longer -maintained and has been dropped in favor of -[cw-storage-plus](https://github.com/CosmWasm/cw-storage-plus). - -[cov-badge-crypto]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto -[cov-badge-derive]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-derive -[cov-badge-schema]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-schema -[cov-badge-core]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-core -[cov-badge-std]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-std -[cov-badge-vm]: - https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-vm -[cov-link-crypto]: - https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/crypto -[cov-link-derive]: - https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/derive -[cov-link-schema]: - https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/schema +## Rust crates + +The following Rust crates are maintained in this repository: + +| Crate | Usage | Download | Docs | Coverage | +|------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|--------------------------------------------------| +| cosmwasm‑check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | `cosmwasm-check -h` | N/A | +| cosmwasm‑core | Internal use only | [![cosmwasm-core on crates.io](https://img.shields.io/crates/v/cosmwasm-core.svg)](https://crates.io/crates/cosmwasm-core) | [![Docs](https://docs.rs/cosmwasm-core/badge.svg)](https://docs.rs/cosmwasm-core) | [![Coverage][cov-badge-core]][cov-link-core] | +| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto on crates.io](https://img.shields.io/crates/v/cosmwasm-crypto.svg)](https://crates.io/crates/cosmwasm-crypto) | [![Docs](https://docs.rs/cosmwasm-crypto/badge.svg)](https://docs.rs/cosmwasm-crypto) | [![Coverage][cov-badge-crypto]][cov-link-crypto] | +| cosmwasm‑derive | Internal use only | [![cosmwasm-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-derive.svg)](https://crates.io/crates/cosmwasm-derive) | [![Docs](https://docs.rs/cosmwasm-derive/badge.svg)](https://docs.rs/cosmwasm-derive) | [![Coverage][cov-badge-derive]][cov-link-derive] | +| cosmwasm‑schema | Contract development | [![cosmwasm-schema on crates.io](https://img.shields.io/crates/v/cosmwasm-schema.svg)](https://crates.io/crates/cosmwasm-schema) | [![Docs](https://docs.rs/cosmwasm-schema/badge.svg)](https://docs.rs/cosmwasm-schema) | [![Coverage][cov-badge-schema]][cov-link-schema] | +| cosmwasm‑schema‑derive | Internal use only | | | | +| cosmwasm‑std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | [![Coverage][cov-badge-std]][cov-link-std] | +| cosmwasm‑vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | [![Coverage][cov-badge-vm]][cov-link-vm] | +| cosmwasm‑vm‑derive | Internal use only | | | | + +[cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto +[cov-badge-derive]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-derive +[cov-badge-schema]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-schema +[cov-badge-core]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-core +[cov-badge-std]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-std +[cov-badge-vm]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-vm +[cov-link-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/crypto +[cov-link-derive]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/derive +[cov-link-schema]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/schema [cov-link-core]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/core [cov-link-std]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/std [cov-link-vm]: https://codecov.io/gh/CosmWasm/cosmwasm/tree/main/packages/vm +## Dependencies + +The following diagram shows the dependencies between the Rust crates in this repository: + +```mermaid +--- +config: + theme: 'forest' +--- + +graph BT + A("`**cosmwasm-core** + 3.0.1`") + + B("`**cosmwasm-std** + 3.0.1`") + + C("`**cosmwasm-crypto** + 3.0.1`") + + D("`**cosmwasm-vm** + 3.0.1`") + + F("`**cosmwasm-vm-derive** + 3.0.1`") + + G("`**cosmwasm-derive** + 3.0.1`") + + J("`**cosmwasm-schema** + 3.0.1`") + + K("`**cosmwasm-schema-derive** + 3.0.1`") + + L("`**cosmwasm-check** + 3.0.1`") + + A --> B + A --> C + A --> D + C --> B + C --> D + B --> D + F --> D + G --> B + K --> J + B --> L + D --> L + J --> B +``` + ## Overview To get that contract to interact with a system needs many moving parts. To get @@ -74,7 +121,7 @@ This code is compiled into Wasm bytecode as part of the smart contract. Please submit your contract or interface via PR. - [rust-optimizer](https://github.com/cosmwasm/rust-optimizer) - A docker image and scripts to take your Rust code and produce the smallest possible Wasm - output, deterministically. This is designed both for preparing contracts for + output, deterministically. This is designed for preparing contracts for deployment as well as validating that a given deployed contract is based on some given source code, allowing a [similar contract verification algorithm](https://medium.com/coinmonks/how-to-verify-and-publish-on-etherscan-52cf25312945) @@ -462,3 +509,11 @@ nightly toolchain installed as well. | 1 | fast checks, rebuilds lock files | `./devtools/check_contracts_fast.sh` | | 2 | medium fast checks | `./devtools/check_contracts_medium.sh` | | 3 | slower checks | `./devtools/check_contracts_full.sh` | + +## License + +Licensed under [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) +(see [LICENSE][apache-url] and [NOTICE][notice-url]). + +Any contribution intentionally submitted for inclusion in this crate by you, +shall be licensed as above, without any additional terms or conditions. From 86881e402d1dfa80b4e4bc9e7fc262810a8cc9f9 Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:05:40 +0200 Subject: [PATCH 2/7] Updates. --- README.md | 78 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index db1e00c50c..fe7cc5d4ae 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,42 @@ The following Rust crates are maintained in this repository: -| Crate | Usage | Download | Docs | Coverage | -|------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|--------------------------------------------------| -| cosmwasm‑check | Contract development | [![cosmwasm-check on crates.io](https://img.shields.io/crates/v/cosmwasm-check.svg)](https://crates.io/crates/cosmwasm-check) | `cosmwasm-check -h` | N/A | -| cosmwasm‑core | Internal use only | [![cosmwasm-core on crates.io](https://img.shields.io/crates/v/cosmwasm-core.svg)](https://crates.io/crates/cosmwasm-core) | [![Docs](https://docs.rs/cosmwasm-core/badge.svg)](https://docs.rs/cosmwasm-core) | [![Coverage][cov-badge-core]][cov-link-core] | -| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto on crates.io](https://img.shields.io/crates/v/cosmwasm-crypto.svg)](https://crates.io/crates/cosmwasm-crypto) | [![Docs](https://docs.rs/cosmwasm-crypto/badge.svg)](https://docs.rs/cosmwasm-crypto) | [![Coverage][cov-badge-crypto]][cov-link-crypto] | -| cosmwasm‑derive | Internal use only | [![cosmwasm-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-derive.svg)](https://crates.io/crates/cosmwasm-derive) | [![Docs](https://docs.rs/cosmwasm-derive/badge.svg)](https://docs.rs/cosmwasm-derive) | [![Coverage][cov-badge-derive]][cov-link-derive] | -| cosmwasm‑schema | Contract development | [![cosmwasm-schema on crates.io](https://img.shields.io/crates/v/cosmwasm-schema.svg)](https://crates.io/crates/cosmwasm-schema) | [![Docs](https://docs.rs/cosmwasm-schema/badge.svg)](https://docs.rs/cosmwasm-schema) | [![Coverage][cov-badge-schema]][cov-link-schema] | -| cosmwasm‑schema‑derive | Internal use only | | | | -| cosmwasm‑std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | [![Coverage][cov-badge-std]][cov-link-std] | -| cosmwasm‑vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | [![Coverage][cov-badge-vm]][cov-link-vm] | -| cosmwasm‑vm‑derive | Internal use only | | | | +| Crate | Usage | Download | Docs | Coverage | +|------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|----------| +| cosmwasm‑check | Contract development | [![cosmwasm-check][crates-badge-cosmwasm-check]][crates-url-cosmwasm-check] | | | +| cosmwasm‑core | Internal use only | [![cosmwasm-core][crates-badge-cosmwasm-core]][crates-url-cosmwasm-core] | [![docs-cosmwasm-core][docs-badge-cosmwasm-core]][docs-url-cosmwasm-core] | | +| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto on crates.io](https://img.shields.io/crates/v/cosmwasm-crypto.svg)](https://crates.io/crates/cosmwasm-crypto) | [![Docs](https://docs.rs/cosmwasm-crypto/badge.svg)](https://docs.rs/cosmwasm-crypto) | | +| cosmwasm‑derive | Internal use only | [![cosmwasm-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-derive.svg)](https://crates.io/crates/cosmwasm-derive) | [![Docs](https://docs.rs/cosmwasm-derive/badge.svg)](https://docs.rs/cosmwasm-derive) | | +| cosmwasm‑schema | Contract development | [![cosmwasm-schema][crates-badge-cosmwasm-schema]][crates-url-cosmwasm-schema] | [![Docs](https://docs.rs/cosmwasm-schema/badge.svg)](https://docs.rs/cosmwasm-schema) | | +| cosmwasm‑schema‑derive | Internal use only | [![cosmwasm-schema-derive][crates-badge-cosmwasm-schema-derive]][crates-url-cosmwasm-schema-derive] | | | +| cosmwasm‑std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | | +| cosmwasm‑vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | | +| cosmwasm‑vm‑derive | Internal use only | [![cosmwasm-vm-derive][crates-badge-cosmwasm-vm-derive]][crates-url-cosmwasm-vm-derive] | | | +| cw‑schema | Contract development | [![cw-schema][crates-badge-cw-schema]][crates-url-cw-schema] | | | +| cw‑schema‑derive | Internal use only | [![cw-schema-derive][crates-badge-cw-schema-derive]][crates-url-cw-schema-derive] | | | + +[crates-badge-cosmwasm-check]: https://img.shields.io/crates/v/cosmwasm-check.svg +[crates-url-cosmwasm-check]: https://crates.io/crates/cosmwasm-check + +[crates-badge-cosmwasm-core]: https://img.shields.io/crates/v/cosmwasm-core.svg +[crates-url-cosmwasm-core]: https://crates.io/crates/cosmwasm-core +[docs-badge-cosmwasm-core]: https://docs.rs/cosmwasm-core/badge.svg +[docs-url-cosmwasm-core]: https://docs.rs/cosmwasm-core + +[crates-badge-cosmwasm-schema]: https://img.shields.io/crates/v/cosmwasm-schema.svg +[crates-url-cosmwasm-schema]: https://crates.io/crates/cosmwasm-schema + +[crates-badge-cosmwasm-schema-derive]: https://img.shields.io/crates/v/cosmwasm-schema-derive.svg +[crates-url-cosmwasm-schema-derive]: https://crates.io/crates/cosmwasm-schema-derive + +[crates-badge-cosmwasm-vm-derive]: https://img.shields.io/crates/v/cosmwasm-vm-derive.svg +[crates-url-cosmwasm-vm-derive]: https://crates.io/crates/cosmwasm-vm-derive + +[crates-badge-cw-schema]: https://img.shields.io/crates/v/cw-schema.svg +[crates-url-cw-schema]: https://crates.io/crates/cw-schema + +[crates-badge-cw-schema-derive]: https://img.shields.io/crates/v/cw-schema-derive.svg +[crates-url-cw-schema-derive]: https://crates.io/crates/cw-schema-derive [cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto [cov-badge-derive]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-derive @@ -52,29 +77,35 @@ config: graph BT A("`**cosmwasm-core** 3.0.1`") - + B("`**cosmwasm-std** 3.0.1`") - + C("`**cosmwasm-crypto** 3.0.1`") D("`**cosmwasm-vm** 3.0.1`") - F("`**cosmwasm-vm-derive** + E("`**cosmwasm-vm-derive** 3.0.1`") - G("`**cosmwasm-derive** + F("`**cosmwasm-derive** 3.0.1`") - J("`**cosmwasm-schema** + G("`**cosmwasm-schema** 3.0.1`") - K("`**cosmwasm-schema-derive** + H("`**cosmwasm-schema-derive** 3.0.1`") - L("`**cosmwasm-check** + I("`**cosmwasm-check** + 3.0.1`") + + J("`**cw-schema** + 3.0.1`") + + K("`**cw-schema-derive** 3.0.1`") A --> B @@ -83,12 +114,15 @@ graph BT C --> B C --> D B --> D - F --> D + E --> D + F --> B + H --> G + B --> I + D --> I G --> B - K --> J - B --> L - D --> L J --> B + J --> G + K --> J ``` ## Overview From ede894f9205b73e92c0b3811e4426943f34943ea Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:30:41 +0200 Subject: [PATCH 3/7] Updates. --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index fe7cc5d4ae..0016933a29 100644 --- a/README.md +++ b/README.md @@ -14,42 +14,74 @@ The following Rust crates are maintained in this repository: -| Crate | Usage | Download | Docs | Coverage | -|------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|----------| -| cosmwasm‑check | Contract development | [![cosmwasm-check][crates-badge-cosmwasm-check]][crates-url-cosmwasm-check] | | | -| cosmwasm‑core | Internal use only | [![cosmwasm-core][crates-badge-cosmwasm-core]][crates-url-cosmwasm-core] | [![docs-cosmwasm-core][docs-badge-cosmwasm-core]][docs-url-cosmwasm-core] | | -| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto on crates.io](https://img.shields.io/crates/v/cosmwasm-crypto.svg)](https://crates.io/crates/cosmwasm-crypto) | [![Docs](https://docs.rs/cosmwasm-crypto/badge.svg)](https://docs.rs/cosmwasm-crypto) | | -| cosmwasm‑derive | Internal use only | [![cosmwasm-derive on crates.io](https://img.shields.io/crates/v/cosmwasm-derive.svg)](https://crates.io/crates/cosmwasm-derive) | [![Docs](https://docs.rs/cosmwasm-derive/badge.svg)](https://docs.rs/cosmwasm-derive) | | -| cosmwasm‑schema | Contract development | [![cosmwasm-schema][crates-badge-cosmwasm-schema]][crates-url-cosmwasm-schema] | [![Docs](https://docs.rs/cosmwasm-schema/badge.svg)](https://docs.rs/cosmwasm-schema) | | -| cosmwasm‑schema‑derive | Internal use only | [![cosmwasm-schema-derive][crates-badge-cosmwasm-schema-derive]][crates-url-cosmwasm-schema-derive] | | | -| cosmwasm‑std | Contract development | [![cosmwasm-std on crates.io](https://img.shields.io/crates/v/cosmwasm-std.svg)](https://crates.io/crates/cosmwasm-std) | [![Docs](https://docs.rs/cosmwasm-std/badge.svg)](https://docs.rs/cosmwasm-std) | | -| cosmwasm‑vm | Host environments | [![cosmwasm-vm on crates.io](https://img.shields.io/crates/v/cosmwasm-vm.svg)](https://crates.io/crates/cosmwasm-vm) | [![Docs](https://docs.rs/cosmwasm-vm/badge.svg)](https://docs.rs/cosmwasm-vm) | | -| cosmwasm‑vm‑derive | Internal use only | [![cosmwasm-vm-derive][crates-badge-cosmwasm-vm-derive]][crates-url-cosmwasm-vm-derive] | | | -| cw‑schema | Contract development | [![cw-schema][crates-badge-cw-schema]][crates-url-cw-schema] | | | -| cw‑schema‑derive | Internal use only | [![cw-schema-derive][crates-badge-cw-schema-derive]][crates-url-cw-schema-derive] | | | +| Crate | Usage | Download | Docs | Coverage | +|------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|----------| +| cosmwasm‑check | Contract development | [![cosmwasm-check][crates-badge-cosmwasm-check]][crates-url-cosmwasm-check] | [![docs-cosmwasm-check][docs-badge-cosmwasm-check]][docs-url-cosmwasm-check] | | +| cosmwasm‑core | Internal use only | [![cosmwasm-core][crates-badge-cosmwasm-core]][crates-url-cosmwasm-core] | [![docs-cosmwasm-core][docs-badge-cosmwasm-core]][docs-url-cosmwasm-core] | | +| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto][crates-badge-cosmwasm-crypto]][crates-url-cosmwasm-crypto] | [![docs-cosmwasm-crypto][docs-badge-cosmwasm-crypto]][docs-url-cosmwasm-crypto] | | +| cosmwasm‑derive | Internal use only | [![cosmwasm-derive][crates-badge-cosmwasm-derive]][crates-url-cosmwasm-derive] | [![docs-cosmwasm-derive][docs-badge-cosmwasm-derive]][docs-url-cosmwasm-derive] | | +| cosmwasm‑schema | Contract development | [![cosmwasm-schema][crates-badge-cosmwasm-schema]][crates-url-cosmwasm-schema] | [![docs-cosmwasm-schema][docs-badge-cosmwasm-schema]][docs-url-cosmwasm-schema] | | +| cosmwasm‑schema‑derive | Internal use only | [![cosmwasm-schema-derive][crates-badge-cosmwasm-schema-derive]][crates-url-cosmwasm-schema-derive] | [![docs-cosmwasm-schema-derive][docs-badge-cosmwasm-schema-derive]][docs-url-cosmwasm-schema-derive] | | +| cosmwasm‑std | Contract development | [![cosmwasm-std][crates-badge-cosmwasm-std]][crates-url-cosmwasm-std] | [![docs-cosmwasm-std][docs-badge-cosmwasm-std]][docs-url-cosmwasm-std] | | +| cosmwasm‑vm | Host environments | [![cosmwasm-vm][crates-badge-cosmwasm-vm]][crates-url-cosmwasm-vm] | [![docs-cosmwasm-vm][docs-badge-cosmwasm-vm]][docs-url-cosmwasm-vm] | | +| cosmwasm‑vm‑derive | Internal use only | [![cosmwasm-vm-derive][crates-badge-cosmwasm-vm-derive]][crates-url-cosmwasm-vm-derive] | [![docs-cosmwasm-vm-derive][docs-badge-cosmwasm-vm-derive]][docs-url-cosmwasm-vm-derive] | | +| cw‑schema | Contract development | [![cw-schema][crates-badge-cw-schema]][crates-url-cw-schema] | [![docs-cw-schema][docs-badge-cw-schema]][docs-url-cw-schema] | | +| cw‑schema‑derive | Internal use only | [![cw-schema-derive][crates-badge-cw-schema-derive]][crates-url-cw-schema-derive] | [![docs-cw-schema-derive][docs-badge-cw-schema-derive]][docs-url-cw-schema-derive] | | [crates-badge-cosmwasm-check]: https://img.shields.io/crates/v/cosmwasm-check.svg [crates-url-cosmwasm-check]: https://crates.io/crates/cosmwasm-check +[docs-badge-cosmwasm-check]: https://docs.rs/cosmwasm-check/badge.svg +[docs-url-cosmwasm-check]: https://docs.rs/cosmwasm-check [crates-badge-cosmwasm-core]: https://img.shields.io/crates/v/cosmwasm-core.svg [crates-url-cosmwasm-core]: https://crates.io/crates/cosmwasm-core [docs-badge-cosmwasm-core]: https://docs.rs/cosmwasm-core/badge.svg [docs-url-cosmwasm-core]: https://docs.rs/cosmwasm-core +[crates-badge-cosmwasm-crypto]: https://img.shields.io/crates/v/cosmwasm-crypto.svg +[crates-url-cosmwasm-crypto]: https://crates.io/crates/cosmwasm-crypto +[docs-badge-cosmwasm-crypto]: https://docs.rs/cosmwasm-crypto/badge.svg +[docs-url-cosmwasm-crypto]: https://docs.rs/cosmwasm-crypto + +[crates-badge-cosmwasm-derive]: https://img.shields.io/crates/v/cosmwasm-derive.svg +[crates-url-cosmwasm-derive]: https://crates.io/crates/cosmwasm-derive +[docs-badge-cosmwasm-derive]: https://docs.rs/cosmwasm-derive/badge.svg +[docs-url-cosmwasm-derive]: https://docs.rs/cosmwasm-derive + [crates-badge-cosmwasm-schema]: https://img.shields.io/crates/v/cosmwasm-schema.svg [crates-url-cosmwasm-schema]: https://crates.io/crates/cosmwasm-schema +[docs-badge-cosmwasm-schema]: https://docs.rs/cosmwasm-schema/badge.svg +[docs-url-cosmwasm-schema]: https://docs.rs/cosmwasm-schema [crates-badge-cosmwasm-schema-derive]: https://img.shields.io/crates/v/cosmwasm-schema-derive.svg [crates-url-cosmwasm-schema-derive]: https://crates.io/crates/cosmwasm-schema-derive +[docs-badge-cosmwasm-schema-derive]: https://docs.rs/cosmwasm-schema-derive/badge.svg +[docs-url-cosmwasm-schema-derive]: https://docs.rs/cosmwasm-schema-derive + +[crates-badge-cosmwasm-std]: https://img.shields.io/crates/v/cosmwasm-std.svg +[crates-url-cosmwasm-std]: https://crates.io/crates/cosmwasm-std +[docs-badge-cosmwasm-std]: https://docs.rs/cosmwasm-std/badge.svg +[docs-url-cosmwasm-std]: https://docs.rs/cosmwasm-std + +[crates-badge-cosmwasm-vm]: https://img.shields.io/crates/v/cosmwasm-vm.svg +[crates-url-cosmwasm-vm]: https://crates.io/crates/cosmwasm-vm +[docs-badge-cosmwasm-vm]: https://docs.rs/cosmwasm-vm/badge.svg +[docs-url-cosmwasm-vm]: https://docs.rs/cosmwasm-vm [crates-badge-cosmwasm-vm-derive]: https://img.shields.io/crates/v/cosmwasm-vm-derive.svg [crates-url-cosmwasm-vm-derive]: https://crates.io/crates/cosmwasm-vm-derive +[docs-badge-cosmwasm-vm-derive]: https://docs.rs/cosmwasm-vm-derive/badge.svg +[docs-url-cosmwasm-vm-derive]: https://docs.rs/cosmwasm-vm-derive [crates-badge-cw-schema]: https://img.shields.io/crates/v/cw-schema.svg [crates-url-cw-schema]: https://crates.io/crates/cw-schema +[docs-badge-cw-schema]: https://docs.rs/cw-schema/badge.svg +[docs-url-cw-schema]: https://docs.rs/cw-schema [crates-badge-cw-schema-derive]: https://img.shields.io/crates/v/cw-schema-derive.svg [crates-url-cw-schema-derive]: https://crates.io/crates/cw-schema-derive +[docs-badge-cw-schema-derive]: https://docs.rs/cw-schema-derive/badge.svg +[docs-url-cw-schema-derive]: https://docs.rs/cw-schema-derive [cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto [cov-badge-derive]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-derive @@ -220,7 +252,7 @@ points, and no access to the outside world by default. To make them useful, we need to add a few elements. If you haven't worked with WebAssembly before, please read an overview on -[how to create imports and exports](docs/idl.md) in general. +[how to create imports and exports](docs/IDL.md) in general. ### Exports @@ -375,7 +407,7 @@ pub struct Region { ## Implementing the Smart Contract If you followed the [instructions above](#Creating-a-smart-contract), you should -have a runnable smart contract. You may notice that all of the Wasm exports are +have a runnable smart contract. You may notice that all the Wasm exports are taken care of by `lib.rs`, which you shouldn't need to modify. What you need to do is simply look in `contract.rs` and implement `instantiate` and `execute` functions, defining your custom `InstantiateMsg` and `ExecuteMsg` structs for @@ -473,7 +505,7 @@ in our sample contract. You may also want to ensure the compiled contract interacts with the environment properly. To do so, you will want to create a canonical release build of the `.wasm` file and then write tests with the same VM tooling we will use -in production. This is a bit more complicated but we added some tools to help in +in production. This is a bit more complicated, but we added some tools to help in [cosmwasm-vm](https://github.com/CosmWasm/cosmwasm/tree/main/packages/vm) which can be added as a `dev-dependency`. @@ -539,7 +571,7 @@ nightly toolchain installed as well. **Contracts** | Step | Description | Command | -| ---- | -------------------------------- | -------------------------------------- | +|------|----------------------------------|----------------------------------------| | 1 | fast checks, rebuilds lock files | `./devtools/check_contracts_fast.sh` | | 2 | medium fast checks | `./devtools/check_contracts_medium.sh` | | 3 | slower checks | `./devtools/check_contracts_full.sh` | From f09ba6f650375895d89dad6f537b9eae1daea808 Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:06:00 +0200 Subject: [PATCH 4/7] Updates. --- Taskfile.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index ea2795ffcc..1a55cf549d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -52,3 +52,15 @@ tasks: cmds: - cmd: cargo clean - cmd: ./devtools/clean-contracts.sh + + cov-cosmwasm-check: + desc: Generates the code coverage report for cosmwasm-check in text format and prints it to stdout + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.88.0 llvm-cov -p cosmwasm-check --no-cfg-coverage + + cov-cosmwasm-std: + desc: Generates the code coverage report for cosmwasm-std in text format and prints it to stdout + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-std --no-cfg-coverage From 205fd7b8e7d7edccd11e0e6ec87dc782792447ef Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:44:08 +0200 Subject: [PATCH 5/7] Added code coverage. --- README.md | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0016933a29..6ff4779c43 100644 --- a/README.md +++ b/README.md @@ -14,74 +14,85 @@ The following Rust crates are maintained in this repository: -| Crate | Usage | Download | Docs | Coverage | -|------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|----------| -| cosmwasm‑check | Contract development | [![cosmwasm-check][crates-badge-cosmwasm-check]][crates-url-cosmwasm-check] | [![docs-cosmwasm-check][docs-badge-cosmwasm-check]][docs-url-cosmwasm-check] | | -| cosmwasm‑core | Internal use only | [![cosmwasm-core][crates-badge-cosmwasm-core]][crates-url-cosmwasm-core] | [![docs-cosmwasm-core][docs-badge-cosmwasm-core]][docs-url-cosmwasm-core] | | -| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto][crates-badge-cosmwasm-crypto]][crates-url-cosmwasm-crypto] | [![docs-cosmwasm-crypto][docs-badge-cosmwasm-crypto]][docs-url-cosmwasm-crypto] | | -| cosmwasm‑derive | Internal use only | [![cosmwasm-derive][crates-badge-cosmwasm-derive]][crates-url-cosmwasm-derive] | [![docs-cosmwasm-derive][docs-badge-cosmwasm-derive]][docs-url-cosmwasm-derive] | | -| cosmwasm‑schema | Contract development | [![cosmwasm-schema][crates-badge-cosmwasm-schema]][crates-url-cosmwasm-schema] | [![docs-cosmwasm-schema][docs-badge-cosmwasm-schema]][docs-url-cosmwasm-schema] | | -| cosmwasm‑schema‑derive | Internal use only | [![cosmwasm-schema-derive][crates-badge-cosmwasm-schema-derive]][crates-url-cosmwasm-schema-derive] | [![docs-cosmwasm-schema-derive][docs-badge-cosmwasm-schema-derive]][docs-url-cosmwasm-schema-derive] | | -| cosmwasm‑std | Contract development | [![cosmwasm-std][crates-badge-cosmwasm-std]][crates-url-cosmwasm-std] | [![docs-cosmwasm-std][docs-badge-cosmwasm-std]][docs-url-cosmwasm-std] | | -| cosmwasm‑vm | Host environments | [![cosmwasm-vm][crates-badge-cosmwasm-vm]][crates-url-cosmwasm-vm] | [![docs-cosmwasm-vm][docs-badge-cosmwasm-vm]][docs-url-cosmwasm-vm] | | -| cosmwasm‑vm‑derive | Internal use only | [![cosmwasm-vm-derive][crates-badge-cosmwasm-vm-derive]][crates-url-cosmwasm-vm-derive] | [![docs-cosmwasm-vm-derive][docs-badge-cosmwasm-vm-derive]][docs-url-cosmwasm-vm-derive] | | -| cw‑schema | Contract development | [![cw-schema][crates-badge-cw-schema]][crates-url-cw-schema] | [![docs-cw-schema][docs-badge-cw-schema]][docs-url-cw-schema] | | -| cw‑schema‑derive | Internal use only | [![cw-schema-derive][crates-badge-cw-schema-derive]][crates-url-cw-schema-derive] | [![docs-cw-schema-derive][docs-badge-cw-schema-derive]][docs-url-cw-schema-derive] | | +| Crate | Usage | Download | Docs | Coverage | +|------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| +| cosmwasm‑check | Contract development | [![cosmwasm-check][crates-badge-cosmwasm-check]][crates-url-cosmwasm-check] | [![docs-cosmwasm-check][docs-badge-cosmwasm-check]][docs-url-cosmwasm-check] | ![cov-cosmwasm-check][cov-badge-cosmwasm-check] | +| cosmwasm‑core | Internal use only | [![cosmwasm-core][crates-badge-cosmwasm-core]][crates-url-cosmwasm-core] | [![docs-cosmwasm-core][docs-badge-cosmwasm-core]][docs-url-cosmwasm-core] | ![cov-cosmwasm-core][cov-badge-cosmwasm-core] | +| cosmwasm‑crypto | Internal use only | [![cosmwasm-crypto][crates-badge-cosmwasm-crypto]][crates-url-cosmwasm-crypto] | [![docs-cosmwasm-crypto][docs-badge-cosmwasm-crypto]][docs-url-cosmwasm-crypto] | ![cov-cosmwasm-crypto][cov-badge-cosmwasm-crypto] | +| cosmwasm‑derive | Internal use only | [![cosmwasm-derive][crates-badge-cosmwasm-derive]][crates-url-cosmwasm-derive] | [![docs-cosmwasm-derive][docs-badge-cosmwasm-derive]][docs-url-cosmwasm-derive] | ![cov-cosmwasm-derive][cov-badge-cosmwasm-derive] | +| cosmwasm‑schema | Contract development | [![cosmwasm-schema][crates-badge-cosmwasm-schema]][crates-url-cosmwasm-schema] | [![docs-cosmwasm-schema][docs-badge-cosmwasm-schema]][docs-url-cosmwasm-schema] | ![cov-cosmwasm-schema][cov-badge-cosmwasm-schema] | +| cosmwasm‑schema‑derive | Internal use only | [![cosmwasm-schema-derive][crates-badge-cosmwasm-schema-derive]][crates-url-cosmwasm-schema-derive] | [![docs-cosmwasm-schema-derive][docs-badge-cosmwasm-schema-derive]][docs-url-cosmwasm-schema-derive] | ![cov-cosmwasm-schema-derive][cov-badge-cosmwasm-schema-derive] | +| cosmwasm‑std | Contract development | [![cosmwasm-std][crates-badge-cosmwasm-std]][crates-url-cosmwasm-std] | [![docs-cosmwasm-std][docs-badge-cosmwasm-std]][docs-url-cosmwasm-std] | ![cov-cosmwasm-std][cov-badge-cosmwasm-std] | +| cosmwasm‑vm | Host environments | [![cosmwasm-vm][crates-badge-cosmwasm-vm]][crates-url-cosmwasm-vm] | [![docs-cosmwasm-vm][docs-badge-cosmwasm-vm]][docs-url-cosmwasm-vm] | ![cov-cosmwasm-vm][cov-badge-cosmwasm-vm] | +| cosmwasm‑vm‑derive | Internal use only | [![cosmwasm-vm-derive][crates-badge-cosmwasm-vm-derive]][crates-url-cosmwasm-vm-derive] | [![docs-cosmwasm-vm-derive][docs-badge-cosmwasm-vm-derive]][docs-url-cosmwasm-vm-derive] | ![cov-cosmwasm-vm-derive][cov-badge-cosmwasm-vm-derive] | +| cw‑schema | Contract development | [![cw-schema][crates-badge-cw-schema]][crates-url-cw-schema] | [![docs-cw-schema][docs-badge-cw-schema]][docs-url-cw-schema] | ![cov-cw-schema][cov-badge-cw-schema] | +| cw‑schema‑derive | Internal use only | [![cw-schema-derive][crates-badge-cw-schema-derive]][crates-url-cw-schema-derive] | [![docs-cw-schema-derive][docs-badge-cw-schema-derive]][docs-url-cw-schema-derive] | ![cov-cw-schema-derive][cov-badge-cw-schema-derive] | [crates-badge-cosmwasm-check]: https://img.shields.io/crates/v/cosmwasm-check.svg [crates-url-cosmwasm-check]: https://crates.io/crates/cosmwasm-check [docs-badge-cosmwasm-check]: https://docs.rs/cosmwasm-check/badge.svg [docs-url-cosmwasm-check]: https://docs.rs/cosmwasm-check +[cov-badge-cosmwasm-check]: https://img.shields.io/badge/coverage-98%25%20%E2%94%82%20100%25%20%E2%94%82%20100%25-21b577.svg [crates-badge-cosmwasm-core]: https://img.shields.io/crates/v/cosmwasm-core.svg [crates-url-cosmwasm-core]: https://crates.io/crates/cosmwasm-core [docs-badge-cosmwasm-core]: https://docs.rs/cosmwasm-core/badge.svg [docs-url-cosmwasm-core]: https://docs.rs/cosmwasm-core +[cov-badge-cosmwasm-core]: https://img.shields.io/badge/coverage-%E2%80%94%20%E2%94%82%20%E2%80%94%20%E2%94%82%20%E2%80%94-21b577.svg [crates-badge-cosmwasm-crypto]: https://img.shields.io/crates/v/cosmwasm-crypto.svg [crates-url-cosmwasm-crypto]: https://crates.io/crates/cosmwasm-crypto [docs-badge-cosmwasm-crypto]: https://docs.rs/cosmwasm-crypto/badge.svg [docs-url-cosmwasm-crypto]: https://docs.rs/cosmwasm-crypto +[cov-badge-cosmwasm-crypto]: https://img.shields.io/badge/coverage-81%25%20%E2%94%82%2084%25%20%E2%94%82%2092%25-21b577.svg [crates-badge-cosmwasm-derive]: https://img.shields.io/crates/v/cosmwasm-derive.svg [crates-url-cosmwasm-derive]: https://crates.io/crates/cosmwasm-derive [docs-badge-cosmwasm-derive]: https://docs.rs/cosmwasm-derive/badge.svg [docs-url-cosmwasm-derive]: https://docs.rs/cosmwasm-derive +[cov-badge-cosmwasm-derive]: https://img.shields.io/badge/coverage-84%25%20%E2%94%82%2085%25%20%E2%94%82%2094%25-21b577.svg [crates-badge-cosmwasm-schema]: https://img.shields.io/crates/v/cosmwasm-schema.svg [crates-url-cosmwasm-schema]: https://crates.io/crates/cosmwasm-schema [docs-badge-cosmwasm-schema]: https://docs.rs/cosmwasm-schema/badge.svg [docs-url-cosmwasm-schema]: https://docs.rs/cosmwasm-schema +[cov-badge-cosmwasm-schema]: https://img.shields.io/badge/coverage-61%25%20%E2%94%82%2047%25%20%E2%94%82%2065%25-f52020.svg [crates-badge-cosmwasm-schema-derive]: https://img.shields.io/crates/v/cosmwasm-schema-derive.svg [crates-url-cosmwasm-schema-derive]: https://crates.io/crates/cosmwasm-schema-derive [docs-badge-cosmwasm-schema-derive]: https://docs.rs/cosmwasm-schema-derive/badge.svg [docs-url-cosmwasm-schema-derive]: https://docs.rs/cosmwasm-schema-derive +[cov-badge-cosmwasm-schema-derive]: https://img.shields.io/badge/coverage-76%25%20%E2%94%82%2087%25%20%E2%94%82%2091%25-f4b01b.svg [crates-badge-cosmwasm-std]: https://img.shields.io/crates/v/cosmwasm-std.svg [crates-url-cosmwasm-std]: https://crates.io/crates/cosmwasm-std [docs-badge-cosmwasm-std]: https://docs.rs/cosmwasm-std/badge.svg [docs-url-cosmwasm-std]: https://docs.rs/cosmwasm-std +[cov-badge-cosmwasm-std]: https://img.shields.io/badge/coverage-92%25%20%E2%94%82%2091%25%20%E2%94%82%2094%25-21b577.svg [crates-badge-cosmwasm-vm]: https://img.shields.io/crates/v/cosmwasm-vm.svg [crates-url-cosmwasm-vm]: https://crates.io/crates/cosmwasm-vm [docs-badge-cosmwasm-vm]: https://docs.rs/cosmwasm-vm/badge.svg [docs-url-cosmwasm-vm]: https://docs.rs/cosmwasm-vm +[cov-badge-cosmwasm-vm]: https://img.shields.io/badge/coverage-79%25%20%E2%94%82%2083%25%20%E2%94%82%2090%25-f4b01b.svg [crates-badge-cosmwasm-vm-derive]: https://img.shields.io/crates/v/cosmwasm-vm-derive.svg [crates-url-cosmwasm-vm-derive]: https://crates.io/crates/cosmwasm-vm-derive [docs-badge-cosmwasm-vm-derive]: https://docs.rs/cosmwasm-vm-derive/badge.svg [docs-url-cosmwasm-vm-derive]: https://docs.rs/cosmwasm-vm-derive +[cov-badge-cosmwasm-vm-derive]: https://img.shields.io/badge/coverage-0%25%20%E2%94%82%200%25%20%E2%94%82%200%25-f52020.svg [crates-badge-cw-schema]: https://img.shields.io/crates/v/cw-schema.svg [crates-url-cw-schema]: https://crates.io/crates/cw-schema [docs-badge-cw-schema]: https://docs.rs/cw-schema/badge.svg [docs-url-cw-schema]: https://docs.rs/cw-schema +[cov-badge-cw-schema]: https://img.shields.io/badge/coverage-63%25%20%E2%94%82%2069%25%20%E2%94%82%2065%25-f4b01b.svg [crates-badge-cw-schema-derive]: https://img.shields.io/crates/v/cw-schema-derive.svg [crates-url-cw-schema-derive]: https://crates.io/crates/cw-schema-derive [docs-badge-cw-schema-derive]: https://docs.rs/cw-schema-derive/badge.svg [docs-url-cw-schema-derive]: https://docs.rs/cw-schema-derive +[cov-badge-cw-schema-derive]: https://img.shields.io/badge/coverage-0%25%20%E2%94%82%200%25%20%E2%94%82%200%25-f52020.svg [cov-badge-crypto]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-crypto [cov-badge-derive]: https://codecov.io/gh/CosmWasm/cosmwasm/branch/main/graph/badge.svg?flag=cosmwasm-derive From febf5e134db0898500c4ca814902afee36423d89 Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:44:48 +0200 Subject: [PATCH 6/7] Removed invalid info. --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 6ff4779c43..7bf2bda8a5 100644 --- a/README.md +++ b/README.md @@ -562,9 +562,6 @@ like hashing or signature verification. ## Developing -The ultimate auto-updating guide to building this project is the CI -configuration in `.circleci/config.yml`. - For manually building this repo locally during development, here are a few commands. They assume you use a stable Rust version by default and have a nightly toolchain installed as well. From 7345441c01a10d937155a86dd4eddaf9f6e9280d Mon Sep 17 00:00:00 2001 From: Dariusz Depta <141360751+DariuszDepta@users.noreply.github.com> Date: Mon, 25 Aug 2025 10:46:42 +0200 Subject: [PATCH 7/7] Added code coverage tasks. --- Taskfile.yml | 187 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 175 insertions(+), 12 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index e1eef10a28..826115490b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,7 +4,7 @@ silent: true vars: COSMWASM_CHECK_VERSION: 3.0.1 - TOOLCHAIN: +1.82.0 + TOOLCHAIN: +1.88.0 tasks: @@ -22,14 +22,10 @@ tasks: cmds: - cmd: cargo {{.TOOLCHAIN}} build --workspace - install-cosmwasm-check: - desc: Installs cosmwasm-check tool (released version and currently developed version) + build-cw-schema: + desc: Build cw-schema cmds: - # Install recently released cosmwasm-check and rename it to cosmwasm-check-release - - cmd: cargo +1.88.0 install cosmwasm-check@{{.COSMWASM_CHECK_VERSION}} --locked --force - - cmd: mv ~/.cargo/bin/cosmwasm-check ~/.cargo/bin/cosmwasm-check-release - # Install currently developed version of cosmwasm-check - - cmd: cargo +1.88.0 install --path ./packages/check --locked --force + - cmd: cargo {{.TOOLCHAIN}} build -p cw-schema check-contracts: desc: Performs checks for all contracts @@ -54,19 +50,186 @@ tasks: - cmd: ./devtools/check-contracts.sh parallel clean: - desc: Removes all compiled artifacts + desc: Removes compiled artifacts for crates cmds: - cmd: cargo clean + + clean-all: + desc: Removes all compiled artifacts (crates and contracts) + cmds: + - task: clean - cmd: ./devtools/clean-contracts.sh + cov: + desc: Generates code coverage report for all crates in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo {{.TOOLCHAIN}} llvm-cov --workspace --no-cfg-coverage + cov-cosmwasm-check: - desc: Generates the code coverage report for cosmwasm-check in text format and prints it to stdout + desc: Generates code coverage report for cosmwasm-check in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo {{.TOOLCHAIN}} llvm-cov -p cosmwasm-check --no-cfg-coverage + + cov-badge-cosmwasm-check: + desc: Generates the detailed code coverage badge for cosmwasm-check + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo {{.TOOLCHAIN}} llvm-cov --no-cfg-coverage -p cosmwasm-check --json --summary-only | coverio + + cov-cosmwasm-core: + desc: Generates code coverage report for cosmwasm-core in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-core --no-cfg-coverage + + cov-badge-cosmwasm-core: + desc: Generates the detailed code coverage badge for cosmwasm-core + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-core --json --summary-only | coverio + + cov-cosmwasm-crypto: + desc: Generates code coverage report for cosmwasm-crypto in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-crypto --no-cfg-coverage + + cov-badge-cosmwasm-crypto: + desc: Generates the detailed code coverage badge for cosmwasm-crypto + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-crypto --json --summary-only | coverio + + cov-cw-schema: + desc: Generates code coverage report for cw-schema in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cw-schema --no-cfg-coverage + + cov-badge-cw-schema: + desc: Generates the detailed code coverage badge for cw-schema + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cw-schema --json --summary-only | coverio + + cov-cw-schema-derive: + desc: Generates code coverage report for cw-schema-derive in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cw-schema-derive --no-cfg-coverage + + cov-badge-cw-schema-derive: + desc: Generates the detailed code coverage badge for cw-schema-derive + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cw-schema-derive --json --summary-only | coverio + + cov-cosmwasm-derive: + desc: Generates code coverage report for cosmwasm-derive in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-derive --no-cfg-coverage + + cov-badge-cosmwasm-derive: + desc: Generates the detailed code coverage badge for cosmwasm-derive + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-derive --json --summary-only | coverio + + cov-go-gen: + desc: Generates code coverage report for go-gen in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo {{.TOOLCHAIN}} llvm-cov -p go-gen --no-cfg-coverage + + cov-badge-go-gen: + desc: Generates the detailed code coverage badge for go-gen + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo {{.TOOLCHAIN}} llvm-cov --no-cfg-coverage -p go-gen --json --summary-only | coverio + + cov-cosmwasm-schema: + desc: Generates code coverage report for cosmwasm-schema in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-schema --no-cfg-coverage + + cov-badge-cosmwasm-schema: + desc: Generates the detailed code coverage badge for cosmwasm-schema cmds: - cmd: cargo llvm-cov clean - - cmd: cargo +1.88.0 llvm-cov -p cosmwasm-check --no-cfg-coverage + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-schema --json --summary-only | coverio + + cov-cosmwasm-schema-derive: + desc: Generates code coverage report for cosmwasm-schema-derive in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-schema-derive --no-cfg-coverage + + cov-badge-cosmwasm-schema-derive: + desc: Generates the detailed code coverage badge for cosmwasm-schema-derive + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-schema-derive --json --summary-only | coverio cov-cosmwasm-std: - desc: Generates the code coverage report for cosmwasm-std in text format and prints it to stdout + desc: Generates code coverage report for cosmwasm-std in text format cmds: - cmd: cargo llvm-cov clean - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-std --no-cfg-coverage + + cov-badge-cosmwasm-std: + desc: Generates the detailed code coverage badge for cosmwasm-std + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-std --json --summary-only | coverio + + cov-cosmwasm-vm: + desc: Generates code coverage report for cosmwasm-vm in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-vm --no-cfg-coverage + + cov-badge-cosmwasm-vm: + desc: Generates the detailed code coverage badge for cosmwasm-vm + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-vm --json --summary-only | coverio + + cov-cosmwasm-vm-derive: + desc: Generates code coverage report for cosmwasm-vm-derive in text format + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov -p cosmwasm-vm-derive --no-cfg-coverage + + cov-badge-cosmwasm-vm-derive: + desc: Generates the detailed code coverage badge for cosmwasm-vm-derive + cmds: + - cmd: cargo llvm-cov clean + - cmd: cargo +1.82.0 llvm-cov --no-cfg-coverage -p cosmwasm-vm-derive --json --summary-only | coverio + + install-cosmwasm-check: + desc: Installs cosmwasm-check tool (released version and currently developed version) + cmds: + # Install recently released cosmwasm-check and rename it to cosmwasm-check-release + - cmd: cargo {{.TOOLCHAIN}} install cosmwasm-check@{{.COSMWASM_CHECK_VERSION}} --locked --force + - cmd: mv ~/.cargo/bin/cosmwasm-check ~/.cargo/bin/cosmwasm-check-release + # Install currently developed version of cosmwasm-check + - cmd: cargo {{.TOOLCHAIN}} install --path ./packages/check --locked --force + + test: + desc: Runs all tests + cmds: + - cmd: cargo {{.TOOLCHAIN}} test --workspace + + test-cosmwasm-core: + desc: Runs tests for cosmwasm-core + cmds: + - cmd: cargo {{.TOOLCHAIN}} test -p cosmwasm-core + + test-cw-schema: + desc: Runs tests for cw-schema + cmds: + - cmd: cargo {{.TOOLCHAIN}} test -p cw-schema