Skip to main content

Installation

This page covers how to install and run Miking natively on your system. See other installation methods at the bottom of this page for options.

Install Miking

Required Dependencies

You need to install Opam (OCaml package manager) before you can use the Miking system. See the Opam installation guide for how to install Opam on Mac or on your Linux distribution: Link

For Windows, install Opam using Windows Subsystem for Linux (WSL).

With opam installed, create a switch for Miking and install the packages dune and linenoise. Do that by running the following:

opam update
opam switch create miking-ocaml 5.0.0
eval $(opam env)

opam install dune linenoise
If Using Multiple Opam Switches

Note that the opam switch command lets you have several OCaml installations on your system. When using the Miking system, you need to use the miking-ocaml switch. Running opam switch miking-ocaml followed by eval $(opam env) always takes you back to the correct switch.

Clone the Miking git repository to a suitable location on your system and enter the directory:

git clone https://github.com/miking-lang/miking.git
cd miking

If you do not have git installed on your system then you can manually download a zip file with the source code from our GitHub page: https://github.com/miking-lang/miking/archive/refs/heads/develop.zip

Assuming that you have downloaded the repository and are currently located in that directory, then you can either install Miking on your system with make or directly using your shell:

Install

With make available, you can install Miking as:

make install

This will install the mi binary under $HOME/.local/bin, as well as the standard library under $HOME/.local/lib. If not already, make sure that $HOME/.local/bin is on your shell's PATH by running the following command directly or adding it to the appropriate .rc-file (e.g. .bashrc or .zshrc):

export PATH="$HOME/.local/bin:$PATH"

This concludes the basic installation. You can now compile and run MCore programs using mi compile:

> echo 'mexpr print "Hello, Miking!\n"' > hello.mc
> mi compile hello.mc
> ./hello
Hello, Miking!

See the documentation page for more usage.

Uninstall

To uninstall Miking, run the following in the cloned Miking repository:

make uninstall

Optional Dependencies

Certain parts of the standard library depends on additional OCaml packages to properly function. See below for how to install them for your system:

Optional Dependencies

Install the dependencies with Opam:

opam install pyml toml lwt owl ocamlformat.0.24.1

Opam should invoke your distribution's package manager if there are any additional dependencies needed.

Other Installation Methods

There are various packaging options for Miking including nix, guix, and a self-contained tarball. See the README under misc/packaging directory in the Miking repository for more information.

We also provide Docker images for Miking on Docker Hub that come with a prebuilt mi binary and all dependencies. See the documentation on Docker Hub for how to run it.