This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
16
unikernel/duniverse/dune_/example/hello_world.t/README.md
Normal file
16
unikernel/duniverse/dune_/example/hello_world.t/README.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
This project is called `hello_world`. It defines one library called
|
||||
`hello_world` and one executable called `hello_world`.
|
||||
|
||||
The library is defined in `lib` and the executable in `bin`. It also defines a
|
||||
test in `test`.
|
||||
|
||||
At the toplevel of the project, there is a `hello_world.opam` file. This file
|
||||
is required so that Dune knows that this is the `hello_world` project.
|
||||
|
||||
To build everything that is meant to be installed in this project, type:
|
||||
|
||||
$ dune build @install
|
||||
|
||||
To run the tests, type:
|
||||
|
||||
$ dune runtest
|
||||
7
unikernel/duniverse/dune_/example/hello_world.t/bin/dune
Normal file
7
unikernel/duniverse/dune_/example/hello_world.t/bin/dune
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(executables
|
||||
(names main)
|
||||
(libraries hello_world))
|
||||
|
||||
(install
|
||||
(section bin)
|
||||
(files (main.exe as hello_world)))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = print_endline Hello_world.message
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(lang dune 1.1)
|
||||
(name hello_world)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
opam-version: "2.0"
|
||||
version: "1.0"
|
||||
maintainer: "bob@sponge.com"
|
||||
authors: ["SpongeBob"]
|
||||
homepage: "https://github.com/SpongeBob/hello_world"
|
||||
bug-reports: "https://github.com/SpongeCob/hello_world/issues"
|
||||
dev-repo: "git+https://github.com/SpongeBob/hello_world.git"
|
||||
license: "Apache-2.0"
|
||||
build: [
|
||||
["dune" "build" "-p" name "-j" jobs]
|
||||
]
|
||||
2
unikernel/duniverse/dune_/example/hello_world.t/lib/dune
Normal file
2
unikernel/duniverse/dune_/example/hello_world.t/lib/dune
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(library
|
||||
(public_name hello_world))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let message = "Hello, world!"
|
||||
6
unikernel/duniverse/dune_/example/hello_world.t/run.t
Normal file
6
unikernel/duniverse/dune_/example/hello_world.t/run.t
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Build an example project and run the tests:
|
||||
$ dune build @install @runtest
|
||||
|
||||
Rebuild main if necessary, and run it
|
||||
$ dune exec ./bin/main.exe
|
||||
Hello, world!
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(test
|
||||
(name test)
|
||||
(libraries hello_world))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello, world!
|
||||
|
|
@ -0,0 +1 @@
|
|||
print_endline Hello_world.message
|
||||
Loading…
Add table
Add a link
Reference in a new issue