| Crates.io | cord-path |
| lib.rs | cord-path |
| version | 1.0.0 |
| created_at | 2025-08-08 08:29:40.569035+00 |
| updated_at | 2025-08-08 08:29:40.569035+00 |
| description | 2 dimensional coordinate based path finder |
| homepage | |
| repository | https://github.com/HardBoss07/cord-path |
| max_upload_size | |
| id | 1786415 |
| size | 57,580 |
cord-pathA high-performance CLI tool for finding an optimal travel path through a set of 2D points. cord-path leverages NVIDIA CUDA to accelerate distance matrix calculations, making it ideal for large datasets where speed is critical.
Requires: NVIDIA driver 580.88 or later.
Download the latest pre-compiled binary from the Releases page. Place the executable in a directory that is included in your system's PATH.
chmod +x cord-path
sudo mv cord-path /usr/local/bin/
Move-Item .\cord-path.exe "C:\Program Files\cord-path\"
# You may need to add "C:\Program Files\cord-path\" to your system's PATH
cord-path -f <file.csv> [options]
| Flag | Description |
|---|---|
-f, --file <FILE> |
Path to a CSV file containing coordinates. Each line must be in the format: x,y |
| Flag | Description |
|---|---|
-x, --start-x <X> |
Optional starting X coordinate (supports negative values). |
-y, --start-y <Y> |
Optional starting Y coordinate (supports negative values). |
-o, --output <FILE> |
Path to the output CSV file where the calculated path will be saved. |
-q, --quiet |
Suppresses all console output. Only works when used with --output. |
-h, --help |
Displays the help message and exits. |
-V, --version |
Displays the version number and exits. |
cord-path -f points.csv
Output:
Path length before 2-opt: 51234.77
Path length after 2-opt: 49201.12
Path order:
Point 0: (100, 250)
Point 1: (150, 200)
...
cord-path -f points.csv -x 200 -y -500
cord-path -f points.csv -o result.csv
cord-path -f points.csv -o result.csv -q
This command will save the path to result.csv without printing any information to the console.
The input file must be a plain CSV with two integer or float values per line, representing the X and Y coordinates.
100,200
150.5,220.8
-50,400
...
Clone the repository:
git clone [https://github.com/HardBoss07/cord-path.git](https://github.com/HardBoss07/cord-path.git)
cd cord-path
Build the CUDA static library:
cd cuda
nvcc -O3 --compiler-options '-fPIC' -c kernels.cu -o kernels.o
ar rcs libcuda_kernels.a kernels.o
cd ..
Build the Rust CLI:
cargo build --release
The final executable binary will be located at:
target/release/cord-path
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
You can read the full license text in the LICENSE file.