This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View 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

View file

@ -0,0 +1,7 @@
(executables
(names main)
(libraries hello_world))
(install
(section bin)
(files (main.exe as hello_world)))

View file

@ -0,0 +1 @@
let () = print_endline Hello_world.message

View file

@ -0,0 +1,2 @@
(lang dune 1.1)
(name hello_world)

View file

@ -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]
]

View file

@ -0,0 +1,2 @@
(library
(public_name hello_world))

View file

@ -0,0 +1 @@
let message = "Hello, world!"

View 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!

View file

@ -0,0 +1,3 @@
(test
(name test)
(libraries hello_world))

View file

@ -0,0 +1 @@
Hello, world!

View file

@ -0,0 +1 @@
print_endline Hello_world.message