syndicate-sh/README.md

49 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2021-08-19 23:28:28 +00:00
# syndicate-sh
This is an implementation of the Syndicate network protocol (based on
2022-05-24 12:00:57 +00:00
[Preserves](https://preserves.dev/)) for Bash.
2021-08-19 23:28:28 +00:00
**Q.** Is this a joke, or is this serious?
**A.** Yes.
## Dependencies
First, it depends on Bash-specific shell features.
2021-08-19 23:51:19 +00:00
Second, you'll need a Syndicate network server ("broker"). The best
option at present is the Rust-language server. Unfortunately it relies
on a few nightly-only features of Rust, so I use `rustup` to get a
nightly toolchain, and then use that:
2021-08-19 23:28:28 +00:00
2021-08-19 23:51:19 +00:00
# compiling syndicate-server from source needs these things:
2021-08-20 15:38:57 +00:00
apt install libssl-dev pkg-config curl build-essential
2021-08-19 23:51:19 +00:00
# this is the command-line given by https://rustup.rs/:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# follow the instructions
# then log out and in again
# now you can get the nightly toolchain:
rustup toolchain install nightly
2021-08-19 23:28:28 +00:00
2021-08-19 23:51:19 +00:00
# and finally the server:
cargo +nightly install syndicate-server
2021-08-19 23:28:28 +00:00
2021-08-19 23:51:19 +00:00
Third, you'll need the `preserves-tool` program, which `syndicate.sh`
uses to slice and dice network packets. It's also written in Rust (but
doesn't require nightly), so you can get it with:
cargo install preserves-tools
2021-08-19 23:28:28 +00:00
## Running the demo
2021-10-05 17:49:53 +00:00
Start the server in one terminal, in the same directory as this
`README.md` file:
2021-08-19 23:28:28 +00:00
syndicate-server -s ./sock
2021-10-05 17:49:53 +00:00
Then, in one or more other terminals, run `chat.sh` from the same
directory:
2021-08-19 23:28:28 +00:00
2021-10-05 17:49:53 +00:00
./examples/chat.sh