Skip to main content

socketry_project/
lib.rs

1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4//! Shared Socketry Rust project conventions and development tasks.
5//!
6//! Add this crate to a private `bake/` package to link the standard project
7//! tasks and their published agent context into a repository.
8use bake::{Context, Result};
9use bake_agent_context as _;
10use bake_cargo as _;
11use bake_license as _;
12use bake_markdown as _;
13use bake_readme as _;
14use bake_releases as _;
15use bake_test_rust as _;
16
17mod markdown;
18
19/// Refresh the standard project files after a Cargo version bump.
20#[bake::task(name = "cargo:after_version_bump")]
21pub fn after_version_bump(context: &mut Context, version: String) -> Result<()> {
22    context.call("license:update", &[])?;
23    context.call("releases:update", &[&format!("v{version}")])?;
24    context.call("readme:update", &[])?;
25    markdown::normalize(context)?;
26    Ok(())
27}
28
29#[cfg(test)]
30#[path = "tests.rs"]
31mod tests;