Skip to content

Commit

Permalink
Merge pull request #31 from cmars/chore/update-readme-streamline-dev
Browse files Browse the repository at this point in the history
chore: update readme to reflect streamlined development
  • Loading branch information
cmars authored Mar 31, 2024
2 parents 33007cd + 69ad660 commit 780c6d6
Showing 1 changed file with 32 additions and 16 deletions.
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.

0 comments on commit 780c6d6

Please sign in to comment.