Installing YS
YS has 3 main things you might want to install:
- The
yscompiler, loader and runner command. - The
libys.soshared library needed by a YS loader library for your particular programming language. - A YS loader library for your particular programming language, like Python, Rust, NodeJS, etc.
Install ys with Homebrew🔗
You can install ys on macOS or Linux with Homebrew.
Just run these commands:
brew tap yaml/yamlscript
brew install ys
Homebrew support for installing libys is coming soon.
Quick Install Script for ys and libys🔗
You can install both ys and libys with a single CLI command, where:
VERSIONdefaults to the latest YS version.PREFIXdefaults to$HOME/.local.LIB=1means only install the shared library.BIN=1means only install theysbinary.
Examples:
$ curl https://yamlscript.org/install | bash
$ curl https://yamlscript.org/install | VERSION=0.2.7 bash
$ curl https://yamlscript.org/install | VERSION=0.2.7 LIB=1 bash
$ curl https://yamlscript.org/install | PREFIX=/tmp/yamlscript bash
For the ys command you'll need to have PREFIX/bin in your PATH, but the
install script will tell you that.
For libys, unless you use the default PREFIX you'll need to add
PREFIX/lib to your LD_LIBRARY_PATH.
An even shorter command to install ys
$ curl -s https://getys.org/ys | bash
You can use all the same options as above (before bash).
Download and Install🔗
All the binary pre-built release files are
here
.
- Download the appropriate release file.
- Expand the file with
$ tar xf <release-file>. - Use
cdto enter the release directory. - Run
make installormake install PREFIX=.... - Or just copy the binary file to the place where you want it.
Build a Release from Source🔗
You can also easily build and install ys and libys from source:
- Download the "Source code" release file.
- Expand the file with
$ tar xf <release-file>. - Use
cdto enter the release directory. - Run
make installormake install PREFIX=....
This will take a few minutes but it requires no dependencies besides bash,
make and curl.
Note
On Linux it also requires the libz-dev package.
Install a YS Loader Library🔗
YS loader libraries are intended to be a drop in replacement for your current YAML loader.
YS loader libraries are currently available for these programming languages:
Install the library you want using the normal library installer for your
language.
Then install the matching version of the libys shared library as
described above.
Note
Currently when you install a YS loader library for your
particular programming language you must also install the libys
shared library of the exact same version.
Fortunately this is simple.