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,14 @@
We can use our local packages, in our documentation thanks to dune's mdx stanza:
```ocaml
# #require "pkg.public-lib";;
# Public_lib.x;;
- : int = 0
```
We can also use our local public executables:
```sh
$ public-bin
Hey!
```

View file

@ -0,0 +1,4 @@
(executable
(name public_bin)
(public_name public-bin)
(modules public_bin))

View file

@ -0,0 +1 @@
let () = Printf.printf "Hey!\n"

View file

@ -0,0 +1,3 @@
(mdx
(files README.md)
(packages pkg))

View file

@ -0,0 +1,4 @@
(lang dune 2.4)
(name pkg)
(using mdx 0.1)

View file

@ -0,0 +1,4 @@
(library
(name public_lib)
(public_name pkg.public-lib)
(modules public_lib))

View file

@ -0,0 +1,4 @@
You can make local packages available to mdx by using the `packages` field of
the stanza
$ dune runtest