Skip to content

v2.0.0-beta

Choose a tag to compare

@github-actions github-actions released this 03 Apr 12:10
· 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 utilizes ignore and globset for directory traversal and filtering, significantly reducing scanning and I/O latency for large projects.
  • Strict Configuration Architecture
    Introduced the AppConfig resolution 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:
    1. Exclude first: If a path matches an exclude pattern, it is immediately discarded.
    2. Include second: If not excluded, it must match an include pattern to be kept.
    3. Default allowance: If include is not set, all non-excluded files are kept.
  • Native Tree Generation
    Tree structure previews (tree_include, tree_exclude) are now natively implemented, utilizing io_utils::tee to 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 | iex

macOS / Linux (Terminal):

curl -sSL https://raw.githubusercontent.com/TW-RF54732/OneSource/main/install.sh | bash

Build from source (Cargo):

cargo install --git https://github.com/TW-RF54732/OneSource.git