Quick Start
Installation
On macOS via Homebrew
If you use Homebrew, you can install using:
brew install curvelogic/homebrew-tap/eucalypt
Linux / macOS (install script)
Alternatively, install the latest release binary directly:
curl -sSf https://raw.githubusercontent.com/curvelogic/eucalypt/master/install.sh | sh
This installs to ~/.local/bin. Set EUCALYPT_INSTALL_DIR to
override the install location.
Otherwise binaries for macOS are available on the releases page.
On Linux
x86_64 and aarch64 binaries built in CI are available on the releases page.
On Windows
Sorry, haven't got there yet. But you could try installing from source.
From source
You will need a Rust installation and cargo.
Build and install should be as simple as:
cargo install --path .
Testing your installation
eu --version
...prints the version:
eu 0.3.0
...and...
eu --help
...shows command line help:
A functional language for structured data
Usage: eu [OPTIONS] [FILES]... [COMMAND]
Commands:
run Evaluate eucalypt code (default)
test Run tests
dump Dump intermediate representations
version Show version information
explain Explain what would be executed
list-targets List targets defined in the source
fmt Format eucalypt source files
lsp Start the Language Server Protocol server
help Print this message or the help of the given subcommand(s)
Arguments:
[FILES]... Files to process (used when no subcommand specified)
Options:
-L, --lib-path <LIB_PATH> Add directory to lib path
-Q, --no-prelude Don't load the standard prelude
-B, --batch Batch mode (no .eucalypt.d)
-d, --debug Turn on debug features
-S, --statistics Print metrics to stderr before exiting
--statistics-file <STATISTICS_FILE> Write statistics as JSON to a file
-h, --help Print help
-V, --version Print version
Use eu <command> --help for detailed help on each subcommand.
Your first program
Create a file called hello.eu:
greeting: "Hello, World!"
Run it:
eu hello.eu
Output:
greeting: Hello, World!
Try JSON output:
eu hello.eu -j
{"greeting": "Hello, World!"}
Next steps
- Read the lightning tour for a quick taste of what eucalypt can do
- Work through The Eucalypt Guide for a progressive tutorial
- Browse Eucalypt by Example for worked examples