The Steel separation logic library for F*
40
stars
5,629
commits
F*
primary language
Jun 8, 2026
updated
TODO: write the corresponding Part 8 in https://fstar-lang.org/tutorial
This repository is the result of splitting Steel away from the F* code base. It now works with F* and Karamel master branches.
This repository contains:
This repository has been designed to closely follow the Filesystem Hierarchy Standard (FHS), so that it can be used the same way in all the following cases:
/usr/local)In all cases, a Steel installation (or the Steel repository clone) is laid out as follows:
in lib/steel:
Steel and Steel.ST namespacessteel.cmxs, containing the Steel
tactic, and the Steel and SteelC extraction to krml, is installed
herelibsteel.a, containing an implementation of
what used to be the Steel part of krmllib (currently binding the
pthreads spinlock), is installed herein lib/steel/runtime: the Steel OCaml runtime,
steel_runtime.cmxa, necessary to compile and run Steel code
extracted to OCaml, is installed here
in lib/steel/c: the SteelC F* modules of the Steel.C and
Steel.ST.C namespaces
in include/steel: the C include files necessary to compile Steel
code extracted to C
in share/steel: Makefile.include, the GNU Make rules to verify
Steel code
In addition, share/steel also contains all examples and tests, but
those are not installed as of now.
fstar.exe is in your PATH. If F* was installed with
opam, you may need to run eval $(opam env). If F* is not in your
PATH, set the FSTAR_EXE environment variable the full path
for the F* executable.make -jPREFIX=<your prefix> make -j install . By default,
PREFIX will be set to /usr/local, as per the UNIX custom.Clone the F* repository and install F* with opam install <path to FStar>/./fstar.opam. This will build F* and all of its
dependencies (including Z3)
(Right now the F* release on the opam package repository is too
old. Once version 2023.04.15 or later is made available on the opam
repository, cloning the F* repository will no longer be necessary,
and opam install fstar should be enough for this step.)
Build and install Steel with opam install ./steel.opam
Steel comes with share/steel/Makefile.include (which is also
properly installed by make install or via opam), which contains the
GNU Make rules to call F* with the Steel include path and the Steel
plugin loaded.
Make sure fstar.exe is in your PATH. If F* was installed with
opam, you may need to run eval $(opam env). If F* is not in your
PATH, set the FSTAR_EXE environment variable the full path
for the F* executable.
Define the STEEL_HOME environment variable. This should be one of the following:
make install: The PREFIX directory used when installing Steelopam: The prefix directory of the opam
switch where Steel was installed, obtained with opam config var prefix(Optional) In your Makefile, define the following variables with += or := :
FSTAR_FILES: some more F* files to verify, in addition to the
*.fst and .fsti files of your projectEXCLUDE_FILES: some F* to skip for verificationFSTAR_OPTIONS: additional options to pass to F*. While
Makefile.include is already configured to use Steel, you need
to add more options if you need SteelC:
--include $STEEL_HOME/lib/steel/cFSTAR_DEP_OPTIONS: additional options to pass to F* to compute
dependencies (in addition to FSTAR_OPTIONS), such as --extractFSTAR_ML_CODEGEN: useful only if you want to extract OCaml
code. If you want to extract a F* plugin, set this option to
Plugin. Otherwise, it is set by default to OCaml.After those variable definitions, insert include $STEEL_HOME/share/steel/Makefile.include to your Makefile.
In your project directory, run make -j verify
If you already have an existing Makefile for your Steel-based
project, you now need to pass new options to your Makefile to use
Steel from this repository, as described in this section.
To call F* with Steel:
--include $STEEL_HOME/lib/steel --load_cmxs steel--include $STEEL_HOME/lib/steel/cTODO: we should distribute a binary package with the Steel plugin
statically linked in fstar.exe. In that case, the --load_cmxs steel
option to load the Steel plugin would no longer be necessary. Then,
what about the --include paths?
TODO: add instructions to extract code. Meanwhile, see:
share/steel/examples/steel/llist2/Makefile for a C extraction
example. (The rule to extract *.krml files is already in the
share/steel/Makefile.include file distributed and installed with
Steel.)share/steel/examples/steel/OWGCounter for an OCaml extraction
example. This example has both a Makefile to extract the Steel
code to C, and a dune file to compile the extracted OCaml
code. Most notably, to compile and run OCaml code extracted from
Steel, $STEEL_HOME/lib has to be added to OCAMLPATH (which is
already the case by default with opam, if the opam environment is
properly set up with eval $(opam env)), and the steel.runtime
package has to be used.If you want to contribute to Steel or SteelC code, please read
CONTRIBUTING.md
F*
98.1%
Makefile
1.0%
The Steel separation logic library for F*
40
stars
5,629
commits
F*
primary language
Jun 8, 2026
updated
TODO: write the corresponding Part 8 in https://fstar-lang.org/tutorial
This repository is the result of splitting Steel away from the F* code base. It now works with F* and Karamel master branches.
This repository contains:
This repository has been designed to closely follow the Filesystem Hierarchy Standard (FHS), so that it can be used the same way in all the following cases:
/usr/local)In all cases, a Steel installation (or the Steel repository clone) is laid out as follows:
in lib/steel:
Steel and Steel.ST namespacessteel.cmxs, containing the Steel
tactic, and the Steel and SteelC extraction to krml, is installed
herelibsteel.a, containing an implementation of
what used to be the Steel part of krmllib (currently binding the
pthreads spinlock), is installed herein lib/steel/runtime: the Steel OCaml runtime,
steel_runtime.cmxa, necessary to compile and run Steel code
extracted to OCaml, is installed here
in lib/steel/c: the SteelC F* modules of the Steel.C and
Steel.ST.C namespaces
in include/steel: the C include files necessary to compile Steel
code extracted to C
in share/steel: Makefile.include, the GNU Make rules to verify
Steel code
In addition, share/steel also contains all examples and tests, but
those are not installed as of now.
fstar.exe is in your PATH. If F* was installed with
opam, you may need to run eval $(opam env). If F* is not in your
PATH, set the FSTAR_EXE environment variable the full path
for the F* executable.make -jPREFIX=<your prefix> make -j install . By default,
PREFIX will be set to /usr/local, as per the UNIX custom.Clone the F* repository and install F* with opam install <path to FStar>/./fstar.opam. This will build F* and all of its
dependencies (including Z3)
(Right now the F* release on the opam package repository is too
old. Once version 2023.04.15 or later is made available on the opam
repository, cloning the F* repository will no longer be necessary,
and opam install fstar should be enough for this step.)
Build and install Steel with opam install ./steel.opam
Steel comes with share/steel/Makefile.include (which is also
properly installed by make install or via opam), which contains the
GNU Make rules to call F* with the Steel include path and the Steel
plugin loaded.
Make sure fstar.exe is in your PATH. If F* was installed with
opam, you may need to run eval $(opam env). If F* is not in your
PATH, set the FSTAR_EXE environment variable the full path
for the F* executable.
Define the STEEL_HOME environment variable. This should be one of the following:
make install: The PREFIX directory used when installing Steelopam: The prefix directory of the opam
switch where Steel was installed, obtained with opam config var prefix(Optional) In your Makefile, define the following variables with += or := :
FSTAR_FILES: some more F* files to verify, in addition to the
*.fst and .fsti files of your projectEXCLUDE_FILES: some F* to skip for verificationFSTAR_OPTIONS: additional options to pass to F*. While
Makefile.include is already configured to use Steel, you need
to add more options if you need SteelC:
--include $STEEL_HOME/lib/steel/cFSTAR_DEP_OPTIONS: additional options to pass to F* to compute
dependencies (in addition to FSTAR_OPTIONS), such as --extractFSTAR_ML_CODEGEN: useful only if you want to extract OCaml
code. If you want to extract a F* plugin, set this option to
Plugin. Otherwise, it is set by default to OCaml.After those variable definitions, insert include $STEEL_HOME/share/steel/Makefile.include to your Makefile.
In your project directory, run make -j verify
If you already have an existing Makefile for your Steel-based
project, you now need to pass new options to your Makefile to use
Steel from this repository, as described in this section.
To call F* with Steel:
--include $STEEL_HOME/lib/steel --load_cmxs steel--include $STEEL_HOME/lib/steel/cTODO: we should distribute a binary package with the Steel plugin
statically linked in fstar.exe. In that case, the --load_cmxs steel
option to load the Steel plugin would no longer be necessary. Then,
what about the --include paths?
TODO: add instructions to extract code. Meanwhile, see:
share/steel/examples/steel/llist2/Makefile for a C extraction
example. (The rule to extract *.krml files is already in the
share/steel/Makefile.include file distributed and installed with
Steel.)share/steel/examples/steel/OWGCounter for an OCaml extraction
example. This example has both a Makefile to extract the Steel
code to C, and a dune file to compile the extracted OCaml
code. Most notably, to compile and run OCaml code extracted from
Steel, $STEEL_HOME/lib has to be added to OCAMLPATH (which is
already the case by default with opam, if the opam environment is
properly set up with eval $(opam env)), and the steel.runtime
package has to be used.If you want to contribute to Steel or SteelC code, please read
CONTRIBUTING.md
F*
98.1%
Makefile
1.0%