Skip to content

Commit a5ff45c

Browse files
authored
docs: add and fix crate-level documentation for all CosmWasm crates (#2510)
1 parent 197d09a commit a5ff45c

File tree

11 files changed

+56
-4
lines changed

11 files changed

+56
-4
lines changed

packages/check/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This binary provides a CLI tool for verifying CosmWasm smart contracts before uploading to a blockchain.
3+
//!
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
use std::collections::HashSet;
27
use std::fs::File;
38
use std::io::Read;

packages/core/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This crate contains components of cosmwasm-std that can be used in no_std environments.
3+
//!
4+
//! For more information, see: <https://docs.cosmwasm.com>
5+
16
#![no_std]
27

38
mod crypto;

packages/crypto/src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
//! The crypto crate is intended to be used in internal crates / utils.
2-
//! Please don't use any of these types directly, as
3-
//! they might change frequently, or be removed in the future.
4-
//! This crate does not adhere to semantic versioning.
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This crate implements cryptography-related functions for CosmWasm contracts and internal crates.
3+
//!
4+
//! **Note:** This crate is intended to be used in internal crates / utils only.
5+
//! Please don't use any of these types directly, as they might change frequently,
6+
//! or be removed in the future. This crate does not adhere to semantic versioning.
7+
//!
8+
//! For more information, see: <https://cosmwasm.cosmos.network>
59
610
extern crate alloc;
711

packages/cw-schema-derive/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! Derive macros for cw-schema. For internal use only.
2+
//!
3+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
mod expand;
27

38
macro_rules! bail {

packages/cw-schema/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This crate is a dependency for CosmWasm contracts to generate schema files for their messages.
3+
//!
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
#![no_std]
27

38
extern crate alloc;

packages/derive/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! Derive macros for CosmWasm contract development. For internal use only. Do not use directly.
2+
//!
3+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
15
use proc_macro2::TokenStream;
26
use quote::{format_ident, quote, ToTokens};
37
use std::env;

packages/schema-derive/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! Derive macros for cosmwasm-schema. For internal use only.
2+
//!
3+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
15
mod cw_serde;
26
mod error;
37
mod generate_api;

packages/schema/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This crate is a dev-dependency for CosmWasm contracts to generate JSON Schema files.
3+
//!
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
mod casing;
27
mod export;
38
mod idl;

packages/std/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
2+
//! This crate provides the standard library for Wasm-based smart contracts on Cosmos blockchains.
3+
//!
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
#[cfg(not(feature = "std"))]
27
core::compile_error!(
38
r#"Please enable `cosmwasm-std`'s `std` feature, as we might move existing functionality to that feature in the future.

packages/vm-derive/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
//! Derive macros for cosmwasm-vm. For internal use only. No stability guarantees.
2+
//!
3+
//! CosmWasm is a smart contract platform for the Cosmos ecosystem.
4+
//! For more information, see: <https://cosmwasm.cosmos.network>
5+
16
mod hash_function;
27

38
macro_rules! maybe {

0 commit comments

Comments
 (0)