Crates.io | swift_file |
lib.rs | swift_file |
version | 0.1.9 |
source | src |
created_at | 2023-04-23 15:46:23.755883 |
updated_at | 2023-11-29 09:34:29.437078 |
description | Send or receive files between devices using Wi-Fi network |
homepage | https://github.com/mateoradman/swift_file |
repository | https://github.com/mateoradman/swift_file |
max_upload_size | |
id | 846632 |
size | 328,191 |
Rust implementation of transferring files between devices over Wi-Fi network using a QR code. Tool is inspired by claudiodangelis/qrcp.
The sf server is bound to the IP address of a default network interface of the machine the server is running on. Alternatively, the IP address (--port
), particular network interface (--interface
), and port (--port
) can be selected by the user.
The QR code that is printed encodes a http URL which is typically of the following format:
http://{ip}:{port}/{download|receive}/[optional suffix]
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
swift_file is published on crates.io. In order to install a Rust crate from crates.io, it is required to have Rust and cargo installed on your system.
cargo install swift_file
Latest release page provides an option to manually install the sf binary from an archive. The archive is available for Linux, MacOS, and Windows. Download, extract and move the binary to the desired directory, and set execution permissions.
tar xf swift_file_*_x86_64-unknown-linux-musl.tar.gz
sudo mv sf /usr/local/bin
sudo chmod +x /usr/local/bin/sf
sf --help
unzip swift_file_*_x86_64-apple-darwin.zip
sudo mv sf /usr/local/bin
sudo chmod +x /usr/local/bin/sf
sf --help
Send or receive files between devices using Wi-Fi network
Usage: sf [OPTIONS] <COMMAND>
Commands:
send Send a file
receive Receive a file
help Print this message or the help of the given subcommand(s)
Options:
--ip <IP> IP Address to bind to
-i, --interface <INTERFACE> Network interface to use (ignored if --ip provided)
-p, --port <PORT> Server port
-h, --help Print help
-V, --version Print version
Send a file
Usage: sf send [OPTIONS] <FILE>
Arguments:
<FILE> File path to send
Options:
--ip <IP> IP Address to bind to
--zip ZIP file or directory before transferring
-i, --interface <INTERFACE> Network interface to use (ignored if --ip provided)
-p, --port <PORT> Server port
-h, --help Print help
Receive files
Usage: sf receive [OPTIONS]
Options:
-d, --dest-dir <DEST_DIR> Destination directory
--ip <IP> IP Address to bind to
-i, --interface <INTERFACE> Network interface to use (ignored if --ip provided)
--no-open Disable opening the received file automatically using the system default program
-p, --port <PORT> Server port
-h, --help Print help