-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.ml | ||
_build | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Hello | ||
|
||
open FStar.IO | ||
|
||
let _ = print_string "Hi!\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FSTAR_EXE ?= ../../bin/fstar.exe | ||
|
||
.PHONY: all | ||
all: run | ||
|
||
Hello.ml: Hello.fst | ||
$(FSTAR_EXE) --codegen OCaml Hello.fst --extract Hello | ||
|
||
bin/hello.exe: Hello.ml | ||
$(FSTAR_EXE) --ocamlenv dune build @install --profile=release | ||
$(FSTAR_EXE) --ocamlenv dune install --prefix=. | ||
|
||
.PHONY: run | ||
run: bin/hello.exe | ||
./bin/hello.exe | grep "Hi!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(executable | ||
(name hello) | ||
(public_name hello.exe) | ||
(libraries fstar.lib) | ||
(modes native) | ||
) | ||
(env | ||
(_ | ||
(bin_annot false) | ||
(flags (:standard -w -A))) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(lang dune 3.8) | ||
(name hello) | ||
|
||
(package | ||
(name hello) | ||
(synopsis "An example F* application") | ||
) |