Get Started
Two paths. If you only want to try the language and run the REPL, install the standalone binary. If you are embedding mino in a host program, build from source so you have the headers and per-subsystem object files on hand.
1. Install the standalone REPL
Pre-built binaries ship through Homebrew (macOS, Linux) and Scoop (Windows). Both bundle the standard library and drop a single mino executable on PATH.
Homebrew
brew install leifericf/mino/minoOn first install brew taps leifericf/homebrew-mino automatically. brew upgrade mino picks up new releases.
Scoop
scoop bucket add mino https://github.com/leifericf/scoop-mino
scoop install minoscoop update mino picks up new releases.
Verify
mino --version
minoThe first command prints the installed version. The second drops you into the REPL.
2. Get the source
For embedding, contributing, or running on a platform that brew and scoop don't cover, clone the repository:
git clone https://github.com/leifericf/mino.gitOr download a zip archive. mino is a small C99 codebase in src/. Any C99 compiler, no external dependencies.
3. Build
The C tree is split into per-subsystem subdirectories under src/. Bootstrap with make:
cd mino
make
./minomake is the bootstrap step only — it generates the bundled-source headers and compiles the binary from a clean checkout. Every other build, test, and tooling task runs through the binary itself: ./mino task build for incremental rebuilds, ./mino task test for the test suite, ./mino task build-asan for an ASan-instrumented build, ./mino task on its own to list what's available.
Or compile mino directly into your own program. mino ships a single-file amalgamation — one .c and one .h — generated by:
./mino task amalgamateDrop the resulting dist/mino.c and dist/mino.h into your project tree and compile alongside your own sources:
cc -std=c99 -O2 -o myapp myapp.c dist/mino.c -lm -lpthreadOne include, one .c file, no per-subsystem -I flags. The amalgamation is the canonical drop-in shape for embedders integrating mino into a host project tree.
Run the test suite:
./mino task test4. Embed in your C program
A minimal embedding creates a runtime, registers a host function, evaluates mino code, and extracts the result:
#include "mino.h"
#include <stdio.h>
/* A host function exposed to mino as (add-tax amount). */
static mino_val *host_add_tax(mino_state *S, mino_val *args,
mino_env *env)
{
long long amount;
(void)env;
if (!mino_is_cons(args) || !mino_to_int(mino_car(args), &amount))
return mino_nil(S);
return mino_float(S, (double)amount * 1.08);
}
int main(void)
{
mino_state *S = mino_state_new();
mino_env *env = mino_env_new(S);
mino_install(S, env, MINO_CAP_DEFAULT); /* sandbox preset */
mino_register_fn(S, env, "add-tax", host_add_tax);
mino_val *result = mino_eval_string(S,
"(def prices [100 200 300])\n"
"(reduce + (map add-tax prices))\n",
env);
if (result) {
double total;
if (mino_to_float(result, &total))
printf("total with tax: %.2f\n", total);
}
mino_env_free(S, env);
mino_state_free(S);
return 0;
}Key points:
mino_state_new()creates an isolated runtime state that owns the GC, intern tables, and all allocated objects.mino_env_new(S)creates an empty environment;mino_install(S, env, MINO_CAP_DEFAULT)loads the sandbox preset (core + safe stdlib, no I/O).mino_register_fn()exposes a C function to mino code under any name.mino_eval_string()reads and evaluates all forms, returning the last result.mino_to_float()safely extracts a C value from the result (returns 0 on type mismatch).mino_env_free()andmino_state_free()tear down the environment and state.
5. Try the REPL
The standalone REPL is useful for exploring the language interactively:
$ mino
mino 0.96.8
mino> (def greet (fn [name] (str "hello, " name "!")))
#<fn>
mino> (greet "world")
"hello, world!"
mino> (map greet ["alice" "bob" "carol"])
("hello, alice!" "hello, bob!" "hello, carol!")
mino> (doc 'map)
"(map f coll) -- apply f to each element, return a list of results."Next steps
- Embedding Guide: state lifecycle, value ownership, sandboxing, handles, and threading rules.
- C API Reference: every public function, type, and enum.
- Language Reference: every built-in function, special form, and macro.
- Embedding Cookbook: twelve worked examples for real-world patterns.
License
mino is released under the MIT License. Use it for anything.