Skip to content

giuliom/rusty-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusty-sync

Build & Tests

A Rust file-synchronization tool currently focused on analyzing the differences between a source directory and a destination directory.

Current status

The project is an early work in progress. It currently:

  • walks source and destination directory trees;
  • records file metadata and modification times;
  • calculates SHA3-256 hashes for files, including each file name in the hash;
  • detects files that should be added, modified, or deleted.

The detected actions are not applied yet: running the program does not copy, modify, or delete files.

Requirements

Usage

Run the analyzer with a source and destination directory:

cargo run -- -s <source_directory> -d <destination_directory>

For example, using the included test fixtures:

cargo run -- -s ./test_env/test_source -d ./test_env/test_dest

The program expects exactly four arguments after the executable: -s, the source directory, -d, and the destination directory. Both paths must point to existing directories.

Development

Run the test suite with:

cargo test

Build the project with:

cargo build

Project layout

src/
├── main.rs              # Command-line entry point
└── rsync/
    ├── analyze.rs       # Directory scanning and difference detection
    ├── crypto.rs        # SHA3-256 file hashing
    ├── filesystem.rs    # File, folder, and content-tree models
    └── sync.rs           # Synchronization workflow
test_env/                # Example source and destination trees

Roadmap

  • apply detected add, modify, and delete actions;
  • provide a clearer action summary and error handling;
  • add command-line argument validation and synchronization options;
  • expand filesystem and integration test coverage.

License

See LICENSE.

Releases

Packages

Used by

Contributors

Languages