Rust HTML Shell CSS PLpgSQL JavaScript Ruby
Clone or download
Latest commit 7b706ad Jun 28, 2018
Permalink
Failed to load latest commit information.
database assert_eq! and remove optional behavior Jun 28, 2018
docs update docs/stories.md Dec 23, 2017
lib posticle: fix edge-case when sanitizing literal html Jun 28, 2018
migrations db: remove sequences from ID columns (#17) Mar 6, 2018
scripts bundler installs inside this directory Jun 17, 2018
src transform: escape_html(): fix unnecessary line breaks Jun 28, 2018
static ui: fix accessibility stub Apr 16, 2018
style ui: users can access the profile edit form from their profile page Jun 4, 2018
templates misc fixes for bios Jun 28, 2018
.editorconfig editorconfig: add .js Feb 19, 2018
.env improve DOMAIN handling Jan 6, 2018
.gitattributes .gitattributes: Tell linguist Cargo.lock is generated Jan 14, 2018
.gitignore bundler installs inside this directory Jun 17, 2018
.ruby-version mirror ruby version expressed in travis config Jun 15, 2018
.travis.yml remove unnecessary .env write in travis Jun 15, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Dec 26, 2017
Cargo.lock upgrade to 0.7.0, switch to new form of template inheritance, remove … Jun 26, 2018
Cargo.toml upgrade to 0.7.0, switch to new form of template inheritance, remove … Jun 26, 2018
Gemfile ruby tooling updates Jun 14, 2018
Gemfile.lock ruby tooling updates Jun 14, 2018
LICENSE Create LICENSE Dec 26, 2017
Procfile minor semantics changes in HTML Jun 26, 2018
README.md README.md: update note about setting DOMAIN [skip ci] Jun 16, 2018
REQUIRED_RUST_NIGHTLY required nightly mirrors version in travis config Jun 15, 2018
appspec.yml run scripts to automate Continuous Delivery Jan 23, 2018
build.rs initial commit of askama integration Jun 22, 2018
docker-compose.yml Add a docker-compose file for convenient database provisioning Jun 3, 2018
rustfmt.toml Bikeshed rustfmt config (#9) Jan 13, 2018

README.md

Rustodon

Build Status dependency status

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, UI is WIP, we don't have timelines, etc.

We currently have authentication, users, profiles, statuses, content warnings, actor and status visibility as both HTML and AS2. We do not have timelines, 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, brainstormers, and documentation enthusiasts are highly welcome 😃

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

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
  • bundle exec foreman 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. The app knows where it's serving from (used to compute, eg, AS2 UIDs), so make sure to set DOMAIN in .env.

Running database migrations

diesel database setup

Running the tests

cargo test --all