Librsync-compatible byte-buffer library and Native single-file CLI.
git clone https://github.com/YKDshaxing/moonlibsync.git
cd moonlibsyncpython scripts/install_toolchain.py
if ($LASTEXITCODE -ne 0) { throw 'Toolchain installation failed' }
$env:MOON_HOME = (Resolve-Path '.toolchain/selected').Path
$env:PATH = "$env:MOON_HOME\bin;$env:PATH"
moon update
if ($LASTEXITCODE -ne 0) { throw 'Dependency index failed' }
moon run examples/basic --target native
if ($LASTEXITCODE -ne 0) { throw 'Native example failed' }
moon run examples/basic --target js
if ($LASTEXITCODE -ne 0) { throw 'JS example failed' }
moon run examples/basic --target wasm-gc
if ($LASTEXITCODE -ne 0) { throw 'Wasm-GC example failed' }set -euo pipefail
python3 scripts/install_toolchain.py
export MOON_HOME="$PWD/.toolchain/selected"
export PATH="$MOON_HOME/bin:$PATH"
moon update
moon run examples/basic --target native
moon run examples/basic --target js
moon run examples/basic --target wasm-gcmoon build cmd/moonlibsync --target native$cli = "$PWD/_build/native/debug/build/cmd/moonlibsync/moonlibsync.exe"
& $cli signature 'old file.bin' old.sig --block-size 64 --sum-size 32
if ($LASTEXITCODE -ne 0) { throw 'signature failed' }
& $cli delta old.sig 'new file.bin' update.delta
if ($LASTEXITCODE -ne 0) { throw 'delta failed' }
& $cli patch 'old file.bin' update.delta restored.bin
if ($LASTEXITCODE -ne 0) { throw 'patch failed' }cli="$PWD/_build/native/debug/build/cmd/moonlibsync/moonlibsync.exe"
"$cli" signature 'old file.bin' old.sig --block-size 64 --sum-size 32
"$cli" delta old.sig 'new file.bin' update.delta
"$cli" patch 'old file.bin' update.delta restored.binpython scripts/check.py
python scripts/verify_fixtures.py
python scripts/failure_gates.pybash scripts/rebuild-reference.sh
python3 scripts/consume_signature.py
python3 scripts/consume_delta.py
bash scripts/interop.sh
python3 scripts/file_exchange.pybash scripts/build-reference.sh
python3 scripts/benchmark.py --self-check
python3 scripts/benchmark.pypub(all) suberror SyncError {
InvalidOptions(String)
UnsupportedSignatureProfile
TruncatedInput
InvalidSignature
InvalidDelta
InvalidOpcode
IntegerOutOfRange
CopyOutOfBounds
TrailingData
LimitExceeded
}pub(all) struct Limits {
max_old_bytes : Int64
max_new_bytes : Int64
max_signature_bytes : Int64
max_signature_records : Int64
max_block_bytes : Int64
max_delta_bytes : Int64
max_output_bytes : Int64
max_instructions : Int64
max_match_work : Int64
}pub(all) struct SignatureOptions {
block_len : Int64
strong_sum_len : Int64
}Install
Download zipLibrsync-compatible byte-buffer library and Native single-file CLI.