A Mastodon-compatible, ActivityPub-speaking server in Rust https://rustodon.glitch.social/

dependabot[bot] ac10866f7b Merge pull request #142 from rustodon/dependabot/cargo/itertools-0.7.9 6 hours ago
database 3c67cfdbd7 rustfmt: bröther please give nëwlinës 2 weeks ago
docs 6e08bfd719 update docs/stories.md 11 months ago
lib e06d2694cc clippy: fix lints in posticle crate 2 weeks ago
migrations 80bcad41bf newlines 4 months ago
scripts 0a4fd86613 scripts/setup: alert user when SASS not installed 1 month ago
src e06d2694cc clippy: fix lints in posticle crate 2 weeks ago
static 107abe2966 Restyling web interface 3 months ago
style 505a5837a9 fix wrapping for both cw and content (#130) 4 weeks ago
templates 45bc891903 ui: make profile update flow more fluid 1 month ago
.editorconfig 0527371afa editorconfig: add .js 9 months ago
.env 6a8d17bb35 improve DOMAIN handling 10 months ago
.gitattributes 49fd5928cd .gitattributes: Tell linguist Cargo.lock is generated 10 months ago
.gitignore f29023b945 gitignore: vscode 3 months ago
.travis.yml bf6cda63e6 update to rust nightly-2018-10-31 🎃 2 weeks ago
CODE_OF_CONDUCT.md 00952b395f Create CODE_OF_CONDUCT.md 10 months ago
Cargo.lock e9c8f5a1e3 Bump itertools from 0.7.8 to 0.7.9 19 hours ago
Cargo.toml e9c8f5a1e3 Bump itertools from 0.7.8 to 0.7.9 19 hours ago
LICENSE 051d861859 Create LICENSE 10 months ago
Procfile 7f6ba43f18 Procfile: don't use bundler 1 month ago
README.md b2a8958653 README.md: add maintenance badges 1 week ago
REQUIRED_RUST_NIGHTLY bf6cda63e6 update to rust nightly-2018-10-31 🎃 2 weeks ago
appspec.yml 6e96eb3c53 run scripts to automate Continuous Delivery 10 months ago
build.rs e50b4aabf3 build.rs: switch to dart sass instructions, don't use bundler 1 month ago
diesel.toml bd37704506 add diesel.toml 4 months ago
docker-compose.yml 453090d8ef Add a docker-compose file for convenient database provisioning 5 months ago
rustfmt.toml dfffe85544 Bikeshed rustfmt config (#9) 10 months ago

README.md

Rustodon

Build Status dependency status Average time to resolve an issue Percentage of issues still open chat on Zulip

Rustodon is an Mastodon-compatible federated social microblogging server. It utilizes ActivityPub to federate with a constellation of other servers, connecting their communities with yours.

Current Status

You probably don't want to use this, yet. Federation is WIP, etc.

We currently have authentication, users, profiles, statuses, content warnings, actors and statuses published as both HTML and AS2, and timelines. We do not have a job system, status delivery, inboxes, outboxes, notifcations, mentions, post privacy, or account privacy.

If you want to work on making Rustodon feature-complete, check out the issue tracker! We're not just looking for Rust devs, either; CSS witches, documentarians, UI/UX aficionados, etc, are highly welcome :smiley:

Hacking on the code

You will need to install several base dependencies:

  1. Rust. Make sure you have followed the official instructions regarding your PATH variable. > In the Rust development environment, all tools are installed to the ~/.cargo/bin directory, and this is where you will find the Rust toolchain, including rustc, cargo, and rustup. > Accordingly, it is customary for Rust developers to include this directory in their PATH environment variable. During installation rustup will attempt to configure the PATH. Because of differences between platforms, command shells, and bugs in rustup, the modifications to PATH may not take effect until the console is restarted, or the user is logged out, or it may not succeed at all. > If, after installation, running rustc --version in the console fails, this is the most likely reason.
  2. Postgres. If you don't have a Postgres instance available, you can use the supplied docker-compose configuration file to start an instance: docker-compose up -d The instance will be started in the background. The default username and password is rustodon. The corresponding connection string would be: export DATABASE_URL=postgres://rustodon:rustodon@localhost/rustodon On some operating systems, you may need to separately install the Postgres client library:
    • Debian/Ubuntu/etc: apt install libpq-dev
    • Arch: pacman -S postgresql-libs
  3. SASS. To install, follow the official directions, and make sure the sass binary is somewhere in your PATH.

Once you have installed these base components, you should run scripts/setup to install the remainder of the application dependencies.

Running the application

To run the application once you have installed all dependencies, you should run either:

  • cargo run: Runs just the server
  • fors start: Runs the server and additional helper processes

Rustodon will launch on http://localhost:8000 by default; this can be overriden by setting certain environment variables.

Federation requires that the application know where it's hosted, and (thanks to Webfinger) also forces us to serve over HTTPS. To get around this in a development environment, you can use ngrok or a similar service. To make sure the app knows where it's serving from (used to compute, eg, AS2 UIDs), set DOMAIN in .env.

Running database migrations

diesel database setup

Running the tests

cargo test --all