Repository navigation
v2.0.0-beta
·
92 commits
to main
since this release
OneSource v2.0.0-beta
🚀 Major Update: The Rust Rewrite
OneSource has been completely rewritten from a Python script into a natively compiled Rust project. This update removes all dependencies on the Python environment and pip, transitioning to a single, lightweight, cross-platform binary executable.
✨ Key Highlights
- Zero Dependencies
Completely decoupled from the Python environment. The project now natively provides standalone executables for Windows (x86_64), Linux (x86_64), and macOS (Intel & Apple Silicon). - Performance Leap
Under the hood, it now utilizesignoreandglobsetfor directory traversal and filtering, significantly reducing scanning and I/O latency for large projects. - Strict Configuration Architecture
Introduced theAppConfigresolution pattern, strictly enforcing parameter priority:CLI Input -> .onesourcerc Saved Config -> System Defaults. This effectively resolves previous conflicts between default values and configuration files. - Precise Filtering Logic
Established a strict "Exclude-First" principle:- Exclude first: If a path matches an
excludepattern, it is immediately discarded. - Include second: If not excluded, it must match an
includepattern to be kept. - Default allowance: If
includeis not set, all non-excluded files are kept.
- Exclude first: If a path matches an
- Native Tree Generation
Tree structure previews (tree_include,tree_exclude) are now natively implemented, utilizingio_utils::teeto synchronize terminal standard output and file writing streams.
⚠️ Known Changes & Limitations
- The version number jumps directly from the Python version and is reset to the Rust
v2.0.0-beta. - Features from the Python version such as token calculation (
tiktoken) and clipboard copying (pyperclip) are temporarily not implemented in this Beta phase. - To maintain a simple and efficient release matrix, pre-compiled binaries for Windows ARM64 are currently not provided.
- README not change
- Enclude, exclude logic not stable, can't find hidding file.
- Tree configs not inherit by file configs.
📦 Installation
Windows (PowerShell):
irm https://raw.githubusercontent.com/TW-RF54732/OneSource/main/install.ps1 | iexmacOS / Linux (Terminal):
curl -sSL https://raw.githubusercontent.com/TW-RF54732/OneSource/main/install.sh | bashBuild from source (Cargo):
cargo install --git https://github.com/TW-RF54732/OneSource.git