@@ 100,3 100,74 @@ $ cp build/ec <somewhere on your path>
EC is built using the [Janet][janet] language and needs Janet to
be compiled. You will use the Janet package manager, `jpm`, to install
## Getting Janet
Install the Janet language. You can download the release here: <https://github.com/janet-lang/janet/releases>
It's available on Homebrew: <https://formulae.brew.sh/formula/janet>
And on AUR: <https://aur.archlinux.org/packages/janet-lang/>
You can read the [Janet docs][docs]for more information.
Once you install Janet, you'll have access to the `jpm` command.
## Installing EC
The EC source is available at <https://git.sr.ht/~subsetpark/ec>.
You can use `jpm` to install it, or get it from AUR.
On Linux systems that use the AUR (Arch User Repository), you can install `ec`:
`yay -S ec`
### Installing with `jpm` and `sudo`
You can also use the `jpm` package manager. EC requires `janet-rl`,
which uses the `libedit` library and `pkg-config` program. Make sure
both of those are installed on your system.
Run the following command:
`sudo jpm install https://git.sr.ht/~subsetpark/ec`
This will download and the EC library with all its dependencies,
then compile the `ec` application and install it. (on my machine, it
installs it to `/sbin/ec`).
### Installing with `jpm` and without `sudo`
Clone EC to a working directory and then build it. By default,
`jpm` will install things globally, but you can easily specify a local
directory. Here's an example:
code-src/ec [master !] ⊕ JANET_PATH=janet_modules jpm load-lockfile
<all the deps get downloaded and compiled...>
code-src/ec [master !] ⊕ JANET_PATH=janet_modules/ jpm build
generating executable c source...
found native janet_modules/_jmod_posix_spawn.so...
found native janet_modules/_sh.so...
found native janet_modules/json.so...
found native janet_modules/moondown.so...
compiling build/ec.c to build/build___ec.o...
The `ec` executable is now in the `./build` directory. You move it
wherever you like (I move mine to `~/bin/`).