aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-11 20:59:52 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-11 20:59:52 +0800
commita57a8389a76cdbba3b9fc79c2d521d2beb2751cb (patch)
tree961ac43714f9527646bd0a4dad29ae5cdb251a7c
parent2b13d75deb4ebe1adb93a91e17d2b4f8fcb1a5a6 (diff)
Add project branding and update README structure
- Add project icon and badges to README - Update crate description to "The Rust CLI Framework" - Add table of contents and improve section organization - Move guide.txt to resources directory and update version reference - Add example-completion Cargo.lock for new example - Remove unused main.rs file
-rw-r--r--README.md39
-rw-r--r--examples/example-completion/Cargo.lock158
-rw-r--r--mingling/Cargo.toml2
-rw-r--r--res/guide.txt (renamed from src/guide.txt)2
-rw-r--r--res/icon.pngbin0 -> 206092 bytes
-rw-r--r--src/main.rs3
6 files changed, 196 insertions, 8 deletions
diff --git a/README.md b/README.md
index b784d8d..7c12b0b 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,41 @@
-# Mìng Lìng - 命令
+<p align="center">
+ <a href="https://github.com/CatilGrass/mingling">
+ <img alt="Mingling" src="res/icon.png" width="30%">
+ </a>
+</p>
+<h1 align="center">Mìng Lìng - 命令</h1>
+
+<p align="center">
+ The Rust CLI Framework
+</p>
+<p align="center">
+ <img src="https://img.shields.io/github/stars/CatilGrass/mingling?style=for-the-badge">
+ <a href="https://crates.io/crates/mingling">
+ <img src="https://img.shields.io/badge/Crates.io-0.1.4-yellow?style=for-the-badge">
+ </a>
+ <a href="https://docs.rs/mingling/0.1.4/mingling/">
+ <img src="https://img.shields.io/badge/Docs.rs-0.1.4-orange?style=for-the-badge">
+ </a>
+ <img src="https://img.shields.io/badge/Current-0.1.5-green?style=for-the-badge">
+</p>
> [!WARNING]
>
> **Note**: Mingling is still under active development, and its API may change. Feel free to try it out and give us feedback!
+> **Hint**: This note will be removed in version `0.2.0`
+
+## Contents
+
+- [Intro](#intro)
+- [Quick Start](#quick-start)
+- [Core Concepts](#core-concepts)
+- [Project Structure](#project-structure)
+- [Example Projects](#example-projects)
+- [Next Steps](#next-steps)
+- [Roadmap](#roadmap)
+- [License](#license)
+
+## Intro
`Mingling` is a Rust command-line framework. Its name comes from the Chinese Pinyin for "命令", which means "Command".
@@ -71,7 +104,7 @@ The Mingling project consists of two main parts:
- **[mingling/](mingling/)** - The core runtime library, containing type definitions, error handling, and basic functionality.
- **[mingling_macros/](mingling_macros/)** - The procedural macro library, providing declarative macros to simplify development.
-Example Projects
+## Example Projects
- **[`examples/example-basic/`](examples/example-basic/src/main.rs)** - A simple "Hello, World!" example demonstrating the most basic usage of a Dispatcher and Renderer.
- **[`examples/example-picker/`](examples/example-picker/src/main.rs)** - Demonstrates how to use a Chain to process and transform command arguments.
@@ -89,7 +122,7 @@ You can read the following docs to learn more about the `Mingling` framework:
- [ ] core: \[**unplanned**\] Parallel Chains
- [x] core: \[[0.1.4](https://docs.rs/mingling/0.1.4/mingling/)\] General Renderers *( Json, Yaml, Toml, Ron )*
-- [x] core: \[**0.1.5**\] Completion *( Bash Zsh Fish Pwsl )*
+- [x] core: \[**0.1.5**\] Completion *( Bash Zsh Fish Pwsl )* **\[unreleased\]**
- [ ] \[**unplanned**\] Helpdoc
- [ ] \[**unplanned**\] Parser Theme
- [ ] ...
diff --git a/examples/example-completion/Cargo.lock b/examples/example-completion/Cargo.lock
new file mode 100644
index 0000000..bbe0715
--- /dev/null
+++ b/examples/example-completion/Cargo.lock
@@ -0,0 +1,158 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "bytes"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
+
+[[package]]
+name = "example-completion"
+version = "0.0.1"
+dependencies = [
+ "mingling",
+ "tokio",
+]
+
+[[package]]
+name = "just_fmt"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5454cda0d57db59778608d7a47bff5b16c6705598265869fb052b657f66cf05e"
+
+[[package]]
+name = "just_template"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db3edb658c34b10b69c4b3b58f7ba989cd09c82c0621dee1eef51843c2327225"
+dependencies = [
+ "just_fmt",
+]
+
+[[package]]
+name = "mingling"
+version = "0.1.5"
+dependencies = [
+ "mingling_core",
+ "mingling_macros",
+ "size",
+]
+
+[[package]]
+name = "mingling_core"
+version = "0.1.4"
+dependencies = [
+ "just_fmt",
+ "just_template",
+ "once_cell",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "mingling_macros"
+version = "0.1.3"
+dependencies = [
+ "just_fmt",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "size"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b6709c7b6754dca1311b3c73e79fcce40dd414c782c66d88e8823030093b02b"
+
+[[package]]
+name = "syn"
+version = "2.0.117"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tokio"
+version = "1.51.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c"
+dependencies = [
+ "bytes",
+ "pin-project-lite",
+ "tokio-macros",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
diff --git a/mingling/Cargo.toml b/mingling/Cargo.toml
index 7ff8cdf..3d08662 100644
--- a/mingling/Cargo.toml
+++ b/mingling/Cargo.toml
@@ -5,7 +5,7 @@ edition = "2024"
authors = ["Weicao-CatilGrass"]
license = "MIT OR Apache-2.0"
readme = "README.md"
-description = "A procedural command-line framework with subcommand support"
+description = "The Rust CLI Framework"
keywords = ["cli", "framework", "procedural", "subcommand", "command-line"]
categories = ["command-line-interface"]
repository = "https://github.com/catilgrass/mingling"
diff --git a/src/guide.txt b/res/guide.txt
index 1cac233..4de56b3 100644
--- a/src/guide.txt
+++ b/res/guide.txt
@@ -7,6 +7,6 @@
│ > cargo add mingling │
│ │
│ Or add this to your Cargo.toml │
- │ > mingling = "0.1.4" │
+ │ > mingling = "0.1.5" │
│ │
└────────────────────────────────────┘
diff --git a/res/icon.png b/res/icon.png
new file mode 100644
index 0000000..4fa4f03
--- /dev/null
+++ b/res/icon.png
Binary files differ
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index ed3de5b..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- println!("{}", include_str!("./guide.txt").trim_end_matches("\n"));
-}