Skip to content

Getting Started

Matt Mastracci edited this page Jun 13, 2020 · 6 revisions

Getting Started

To begin, Stylus ships with a number of examples that can be found in the source bundle. Copy the simple_network folder to a location of your choice. In this guide we will assume that it will appear in ~/stylus/.

Running Stylus

There are a number of options for running Stylus.

Docker

The recommended option is to use Docker. A multi-arch Docker container is available under the repository mmastrac/stylus at https://hub.docker.com/r/mmastrac/stylus/.

# Assume that this is running against the stylus example, this will map the example directory into
# the container's /srv folder. The container will automatically load config.yaml from this folder!
docker run --name stylus -p 8000:8000 -v ~/stylus/:/srv mmastrac/stylus:latest

Static Binaries

If you would like to run it from a static binary, you may find a number of pre-built binary releases at https://github.com/mmastrac/stylus/releases.

# This will run against the example in ~/stylus/
stylus-(arch) ~/stylus/

Cargo

For any platform where cargo is natively available, you can simply cargo install the stylus package.

cargo install stylus
stylus ~/stylus/

From Source

If you have the source downloaded, you can run stylus directly from that source directory.

cargo run -- ~/stylus/
Clone this wiki locally