Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme to reflect streamlined development #31

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,47 @@

Distrans (distribution and transfer) sends and receives file content anonymously over the [Veilid](https://veilid.com) network.

# Usage
# Install

`distrans post <file>` indexes and seeds a file, displaying the dht key where it can be downloaded.
## Install binary release

`distrans get <dht key> [directory]` downloads a posted file (defaults to current directory).
Install a [binary release](https://github.com/cmars/distrans/releases) on Linux, macOS or Windows.

# Roadmap
## Install Rust crate

See [project plans](https://github.com/users/cmars/projects/1/views/1) for short-term plans and contribution ideas.
Install the crate with `cargo install distrans`.

Long-term: Full duplex peer downloading and uploading. Trackers and swarms.
Crate dependencies may require system packages to be installed depending on the target platform.

# Development
Debian Bookworm needs `apt-get install build-essential libssl-dev pkg-config`.

Others may be similar.

## Install Nix flake

Run with `nix run github:cmars/distrans`.

Add this flake (`github:cmars/distrans`) as an input to your home manager flake.

Currently distrans builds against veilid-core 0.2.5, which at time of writing does not build without serde tooling installed. Specific versions of capnproto and protobuf are required. First set up a [development environment for Veilid](https://gitlab.com/veilid/veilid/-/blob/main/DEVELOPMENT.md#veilid-development) on your platform of choice (Android / Flutter stuff not required).
Or add the default package to a legacy `home.nix` with something like:

Then `cargo install distrans` and other `cargo` commands should work.
(builtins.getFlake "github:cmars/distrans").packages.x86_64-linux.default

## NixOS
# Usage

`distrans post <file>` indexes and seeds a file, displaying the dht key where it can be downloaded.

The original author of this project develops on NixOS. If you Nix too,
`distrans get <dht key> [directory]` downloads a posted file (defaults to current directory).

### Developing
See `distrans --help` for more options.

`nix develop` in here to get a devshell, then
# Development

`cargo build` and other `cargo` commands to do things.
In a Nix environment, `nix develop github:cmars/distrans` (or `nix develop` in this directory) to get a devshell with the necessary tool dependencies.

### Running
On other platforms a [Veilid development environment](https://gitlab.com/veilid/veilid/-/blob/2ec00e18da999dd16b8c84444bb1e60f9503e752/DEVELOPMENT.md) will suffice.

`nix run github:cmars/distrans`
`capnp` is only necessary when working on the protocol wire-format.

## CICD

Expand All @@ -49,3 +59,9 @@ Github is used for CICD and especially [release automation](https://blog.orhun.d
Branches and releases are regularly mirrored to [Gitlab](https://gitlab.com/cmars232/distrans). Pull requests might be accepted from either, if they fit with the project plans and goals.

Open an issue and ask before picking up a branch and proposing, for best results.

# Roadmap

See [project plans](https://github.com/users/cmars/projects/1/views/1) for short-term plans and contribution ideas.

Long-term: Full duplex peer downloading and uploading. Trackers and swarms.
Loading