There are a couple of reasons to build from source code:
- Fix a bug
- Add a feature
- Learn how it works
- Optimize for your system
- Make a release for your architecture or operating system
Make sure Rust, git (optional) and cargo (installed with Rust) are in your PATH:
git --version
cargo --version
rustc --versionClone or download the repository and build:
git clone https://github.com/mazoti/sync
cd sync
cargo build --features en --release (or br for portuguese)The sync binary will be on target/release folder and ready to use. If you don't need any output you can build without command line interface (CLI) module:
cargo build --releaseWhen comparing files, sync will use 1MB of RAM. To change this, open the file consts.rs and set the variable BUFFER_SIZE to the amount of bytes you want to use. The best value depends on your hardware and your operating system.
Sync uses the operating system copy as default but has it's own:
cargo build --features "en copy" --releaseSync uses hashmaps to find duplicated files, but instead it could use trees:
cargo build --features "en tree" --release