Installing YS
YS has 3 main things you might want to install:
- The
ys
compiler, loader and runner command. - The
libyamlscript.so
shared 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.
Quick Install of ys
and libyamlscript
🔗
You can install both ys
and libyamlscript
with a single CLI command, where:
VERSION
defaults to the latest YS version.PREFIX
defaults to$HOME/.local
.LIB=1
means only install the shared library.BIN=1
means only install theys
binary.
Examples:
$ curl https://yamlscript.org/install | bash
$ curl https://yamlscript.org/install | VERSION=0.1.93 bash
$ curl https://yamlscript.org/install | VERSION=0.1.93 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 libyamlscript
, unless you use the default PREFIX
you'll need to add
PREFIX/lib
to LD_LIBRARY_PATH
and export that variable.
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
cd
to enter the release directory. - Run
make install
ormake 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 libyamlscript
from source:
- Download the "Source code" release file.
- Expand the file with
$ tar xf <release-file>
. - Use
cd
to enter the release directory. - Run
make install
ormake 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 libyamlscript
shared library as
described above.
Note
Currently when you install a YS loader library for your
particular programming language you must also install the libyamlscript
shared library of the exact same version.
Fortunately this is simple.