Installation
Cobalt supports Windows, Linux, and Mac.
OS Package
Arch Linux
pacman -S cobalt
macOS (with Homebrew
brew install cobalt
Pre-built Binary
Requirements: None
Download a release.
or the following will install cobalt to ~/.cargo/bin
:
$ curl -LSfs https://raw.githubusercontent.com/crate-ci/gh-install/master/v1/install.sh | sh -s -- --git cobalt-org/cobalt.rs --crate cobalt
From Source
Requirements
Debian
# Install needed packages with
$ sudo apt install cmake git curl build-essential libssl-dev
# Install rust (do **not** use the package `sudo apt install rust`
# as it will install an old rust version). Use:
$ curl https://sh.rustup.rs -sSf | sh
# Source the Rust environment
$ source $HOME/.cargo/env
Windows
Without syntax highlighting / sass (requires cargo ... --no-default-features
):
- Ensure Rust is installed.
With syntax highlighting / sass:
- Ensure Rust is installed using Build Tools for Visual Studio instead of MinGW/MSYS2.
- Install Windows 10 SDK
- Run
"<VS Path>\vcvarsall.bat" amd64
in your command prompt you'll build from.
From crates.io
Run
$ cargo install cobalt-bin
Building Natively
- Either
git clone https://github.com/cobalt-org/cobalt.rs.git
or Download a zip archive cargo build --release
- Check if all tests are passing with:
cargo test
$ cargo build --release --features=sass
You can also customize the build, including adding support for unstable features:
Building with Docker
$ docker pull rust:latest
$ git clone https://github.com/cobalt-org/cobalt.rs.git
$ cd cobalt.rs
$ docker run --rm -it -u $(id -u):$(id -g) -v ${PWD}:/app -w /app rust:latest cargo build --release --features=sass
The compiled cobalt binary will be in target/release
. If you want to run all tests, use
cargo test --workspace ...
instead.