Restart an interrupted chunked file job
A resumed batch can skip the final partial chunk when it treats a repeated acknowledgement as new progress. Ten bytes form three chunks of width four. The repeated checkpoint for chunk zero leaves the two-byte final chunk to process.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-turnstone.git
cd blyx-turnstone
blyxc native-run project.blyx -- 10 4 "0,0,1"API and return values
Returns [next offset, byte count, remaining chunks, replayed checkpoints]. Offsets use half-open ranges. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| size | nonnegative exact integer |
| width | positive exact integer |
| checkpoints | Vector of: nonnegative exact integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
8 2 1 1
Practice
Change checkpoints = [0, 1, 2]. Predict the result, then run the program.
Hint
Returns [next offset, byte count, remaining chunks, replayed checkpoints]. Offsets use half-open ranges.
Worked solution
The result vector is [10, 0, 0, 0]. Compare its fields with the return layout in the API section.
Find
let checkpoints = [0, 0, 1];Replace with
let checkpoints = [0, 1, 2];Output after the change
10 0 0 0
