🚧 (Alpha stage software) This program is in rapid development and may break or change frequently! 🚧
The distant
binary supplies both a server and client component as well as
a command to start a server and configure the local client to be able to
talk to the server.
tokio
msgpack
Additionally, the core of the distant client and server codebase can be pulled
in to be used with your own Rust crates via the distant-core
crate. The
networking library, which is agnostic of distant
protocols, can be used via
the distant-net
crate.
If you would like a pre-built binary, check out the releases section.
If you have cargo
installed, you can
directly download and build the source via:
bash
cargo install distant
Alternatively, you can clone this repository and build from source following the build guide.
Distant supports multiple backends to facilitate remote communication with another server. Today, these backends include:
distant
- a standalone server acting as the reference implementationssh
- a wrapper around an ssh
client that translates the distant protocol
into ssh server requestsNot every backend supports every feature of distant. Below is a table outlining the available features and which backend supports each feature:
| Feature | distant | ssh | | --------------------- | --------| ----| | Capabilities | ✅ | ✅ | | Filesystem I/O | ✅ | ✅ | | Filesystem Watching | ✅ | ✅ | | Process Execution | ✅ | ✅ | | Reconnect | ✅ | ❌ | | Search | ✅ | ❌ | | System Information | ✅ | ⚠ |
Capabilities
- able to report back what it is capable of performingFilesystem I/O
- able to read from and write to the filesystemFilesystem Watching
- able to receive notifications when changes to the
filesystem occurProcess Execution
- able to execute processesReconnect
- able to reconnect after network outagesSearch
- able to search the filesystemSystem Information
- able to retrieve information about the systemIn order to facilitate communication between a client and server, you first need to start the manager. This can be done in one of two ways:
service
functionality to spawn the manager using one of the
following supported service management platforms:
listen
subcommand```bash
#
distant manager service install
distant manager service install --user
distant manager service start # --user if you are working with user-level ```
```bash
distant manager listen
distant manager listen --daemon ```
Once you have a manager listening for client requests, you can begin interacting with the manager, spawn and/or connect to servers, and interact with remote machines.
```bash
distant client launch ssh://my.example.com
distant client action {command} [args]
distant client action copy path/to/file new/path/to/file distant client action spawn -- echo 'Hello, this is from the other side'
distant client shell
select
subcommanddistant client select '
distant client repl --format json ```
This project is licensed under either of
Apache License, Version 2.0, (LICENSE-APACHE or apache-license) MIT license (LICENSE-MIT or mit-license) at your option.