Skip to content

Instantly share code, notes, and snippets.

@ytakano
Last active December 11, 2019 04:40
Show Gist options
  • Save ytakano/b95aa3b443dec463dadfe80b739aae77 to your computer and use it in GitHub Desktop.
Save ytakano/b95aa3b443dec463dadfe80b739aae77 to your computer and use it in GitHub Desktop.
Installation of F star

Install F* on Ubuntu Linux

Install Opam

See below if you you use ubuntu 19.04

$ sudo apt install opam
$ opam init
$ eval `opam config env`
$ opam update

Choose yes when opam asks something.

Install Opam on Ubuntu 19.04

ocaml/opam#3827

Install mccs

$ sudo apt install opam
$ sudo apt install mccs
$ opam init --solver=mccs
$ eval `opam config env`
$ opam update

Install Dependencies

$ opam install depext
$ opam depext -i conf-gmp conf-m4.1
$ opam install ocamlbuild ocamlfind batteries stdint zarith yojson fileutils pprint menhir ulex ppx_deriving ppx_deriving_yojson process

Install F star

$ wget https://github.com/FStarLang/FStar/releases/download/V0.9.7.0-alpha1/fstar_0.9.7.0-alpha1_Linux_x86_64.tar.gz
$ tar xzfv fstar_0.9.7.0-alpha1_Linux_x86_64.tar.gz
$ cd fstar
$ make -C ulib install-fstarlib

Setup Environment Variables

Add the path to the PATH environment variable. For example, you usually have to add a line as follows to .bashrc file for Bash environment.

export PATH=PATH_TO_FSTAR/bin:$PATH

Replace PATH_TO_FSTAR to the directory you installed F*.

Compile and Run Examples

$ cd fstar
$ make -C examples/hello hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment