Here's how to get up and running with Tamarin either as a CLI or as a library.
If this is your first time trying Tamarin, we recommend starting with the CLI.
Install using Homebrew
Install the Tamarin CLI using Homebrew as follows:
You should then be able to run
tamarin -h to see usage information.
Install the CLI from Source
If you have Go installed on your system, you can build and install by running:
tamarin binary should now be present in
$HOME/go/bin or in the location
corresponding to your GOPATH directory.
Add Tamarin as a Library
go get to add Tamarin as a library dependency of your Go project:
Run the REPL
tamarin command without any options will start the REPL:
ctrl+d will exit the program.
Execute a Tamarin String
tamarin -c "code-to-execute" to directly evaluate a given code string:
Run a Script
To run a Tamarin script in a file, pass the path to the command:
VSCode users can quickly enable Tamarin syntax highlighting by installing the Tamarin VSCode Extension. A TextMate grammar file is available here that may help with syntax highlighting in other editors.