canyontest 0.1.0

A simple Rust library with an add function
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 3.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 997.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • canyon-project/canyontest
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • travzhang

canyontest

一个简单的 Rust 库,提供了一个 add 函数。

功能

  • add(a, b): 将两个数字相加

使用方法

在你的 Cargo.toml 中添加:

[dependencies]
canyontest = "0.1.0"

然后在代码中使用:

use canyontest::add;

fn main() {
    let result = add(2, 3);
    println!("2 + 3 = {}", result); // 输出: 2 + 3 = 5
}

发布到 crates.io

  1. 在 crates.io 上获取 API token
  2. 在 GitHub 仓库的 Settings > Secrets 中添加 CARGO_REGISTRY_TOKEN
  3. 创建并发布一个 release,GitHub Action 会自动发布到 crates.io