-
Notifications
You must be signed in to change notification settings - Fork 4
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/
.
There are a number of options for running Stylus.
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
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/
For any platform where cargo
is natively available, you can simply cargo install
the stylus
package.
cargo install stylus
stylus ~/stylus/
If you have the source downloaded, you can run stylus
directly from that source directory.
cargo run -- ~/stylus/