Workspaces Reference
agentsync is a multi-language project that combines a high-performance Rust core with a TypeScript distribution layer.
Repository Structure
Section titled “Repository Structure”src/: Core logic and CLI implementation in Rust.npm/agentsync/: TypeScript wrapper used for NPM distribution.website/docs/: Documentation site built with Starlight.tests/: Integration tests for the CLI.
Rust Workspace (The Core)
Section titled “Rust Workspace (The Core)”The core logic is written in Rust for speed, safety, and easy distribution as a single binary.
-
Tools: Cargo, Make
-
Version: Rust 1.89+ (Edition 2024)
-
Key Commands:
Terminal window cargo build # Build debug binarycargo test # Run unit and integration testscargo run # Run the CLI locally -
Error Handling: Uses
thiserrorfor custom errors andanyhowfor application-level error handling.
JavaScript Workspace (Distribution)
Section titled “JavaScript Workspace (Distribution)”The JS workspace acts as a wrapper to provide an easy installation path via pnpm/npm. It manages platform-specific binary downloads.
-
Tools: pnpm, TypeScript, Make
-
Location:
npm/agentsync/ -
Key Commands:
Terminal window pnpm run typecheck # Verify typespnpm run build # Compile TypeScript to JS -
Strictness: We enforce strict TypeScript configurations. Avoid
anyat all costs.
Modern Tooling
Section titled “Modern Tooling”We use a Makefile to orchestrate tasks across both Rust and JavaScript stacks.
make install: Install all dependencies (JS and Rust).make verify-all: Run the full verification suite (tests, linters, docs build).make rust-test: Run Rust unit tests.make js-test: Run JavaScript unit tests.make fmt: Format all code (Rust and JS).
We also recommend these modern CLI tools:
bat: Syntax-highlighted file viewing (replacescat).rg(ripgrep): Fast recursive search (replacesgrep).fd: Simple and fast alternative tofind.sd: Intuitive find and replace (replacessed).eza: Feature-rich directory listing (replacesls).