diff options
| author | 2025-11-06 11:26:52 +0800 | |
|---|---|---|
| committer | 2025-11-06 11:26:52 +0800 | |
| commit | 4f7762c1bb7ce719c72c466cebdb00d5def8ea5e (patch) | |
| tree | 38fb539574f0c55e19dc5111b8680048961b0b80 | |
| parent | 3d4081897e267c7fae5f11a7dd55826574e6941b (diff) | |
| download | mvp-4f7762c1bb7ce719c72c466cebdb00d5def8ea5e.tar.gz mvp-4f7762c1bb7ce719c72c466cebdb00d5def8ea5e.zip | |
refactor: refactor project structure and update configurations for MVP implementation
| -rw-r--r-- | .github/workflows/CI.yml | 4 | ||||
| -rw-r--r-- | Cargo.lock | 2 | ||||
| -rw-r--r-- | Cargo.toml | 6 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | mvp/__init__.py (renamed from maturin_template/__init__.py) | 0 | ||||
| -rw-r--r-- | mvp/__main__.py (renamed from maturin_template/__main__.py) | 2 | ||||
| -rw-r--r-- | pyproject.toml | 13 | ||||
| -rw-r--r-- | src/main.rs | 2 |
8 files changed, 17 insertions, 16 deletions
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 34d6b29..f165f9d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -# This file is autogenerated by maturin v1.8.2 +# This file is autogenerated by maturin v1.9.6 # To update, run # # maturin generate-ci github @@ -155,7 +155,7 @@ jobs: steps: - uses: actions/download-artifact@v4 - name: Generate artifact attestation - uses: actions/attest-build-provenance@v1 + uses: actions/attest-build-provenance@v2 with: subject-path: 'wheels-*/*' - name: Publish to PyPI @@ -111,7 +111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] -name = "maturin_template" +name = "mvp" version = "0.1.0" dependencies = [ "clap", @@ -1,13 +1,11 @@ [package] -name = "maturin_template" +name = "mvp" version = "0.1.0" edition = "2021" -# 生成 CLI 可执行文件 [[bin]] -name = "maturin_template" # CLI 名称与 Python 包名一致 +name = "mvp" path = "src/main.rs" [dependencies] -# 例如添加 clap 处理 CLI 参数 clap = { version = "4.0", features = ["derive"] }
\ No newline at end of file @@ -1,3 +1,3 @@ -# maturin-template +# MVP -> maturin template for bin(and cli program).
\ No newline at end of file +> MVP Implementation in Rust and Python by HydroRoll-Team
\ No newline at end of file diff --git a/maturin_template/__init__.py b/mvp/__init__.py index e69de29..e69de29 100644 --- a/maturin_template/__init__.py +++ b/mvp/__init__.py diff --git a/maturin_template/__main__.py b/mvp/__main__.py index 02df57d..2402016 100644 --- a/maturin_template/__main__.py +++ b/mvp/__main__.py @@ -3,7 +3,7 @@ import sys def run_cli(*args): result = subprocess.run( - ["maturin_template", *args], + ["mvp", *args], capture_output=True, text=True ) diff --git a/pyproject.toml b/pyproject.toml index 7297f99..73ec6d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,13 @@ requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" [project] -name = "maturin_template" +name = "mvp" dynamic = ["version"] -description = "A Rust CLI bundled as a Python package" +description = "MVP Implementation in Rust and Python by HydroRoll-Team" authors = [ - { name = "Your Name", email = "your.email@example.com" } + { name = "HsiangNianian", email = "leader@hydroroll.team" } ] -requires-python = ">=3.8" +requires-python = ">=3.11" readme = "README.md" license = { text = "MIT" } classifiers = [ @@ -18,7 +18,10 @@ classifiers = [ "Programming Language :: Python :: 3", ] +[project.scripts] +mvp = "mvp.__main__:main" + [tool.maturin] bindings = "bin" # manifest-path = "Cargo.toml" -module-name = "maturin_template"
\ No newline at end of file +module-name = "mvp"
\ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c3c3fd4..c3fd598 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,4 +10,4 @@ struct Args { fn main() { let args = Args::parse(); println!("Hello from CLI, {}!", args.name); -}
\ No newline at end of file +} |
