package mehari
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=035934743b73b6b5a593d3146533b0b2
sha512=570071e2fadd19e396f8fe86162c75069761acbe5c3b2ab3791c7c30a543a174b7f65bf5ba73bf5842ad5b071faabab071db23c19275b8ee8673190af9007cff
Description
Mehari is a library for building Gemini servers. It fully implements the Gemini protocol specification. It takes heavy inspiration from Dream, a tidy, feature-complete Web framework.
Added to opam-repository:
README
Mehari
Mehari is a library for building Gemini servers. It fully implements the Gemini protocol specification.
It takes inspiration from Dream, a tidy feature-complete Web framework, and from Nightmare, a powerful typesafe layer compatible with Dream.
Mehari provides several packages. See here. Many examples are also provided.
Installation
opam install mehariFeatures
- Mirage OS friendly
- Type safe route API
- Static files serving
- MIME type inference from file content (using experimental Conan support)
- Rate limiting
- Virtual hosting using TLS SNI
- CGI support
Important links
- API documentation: https://docs.heyplzlookat.me/mehari/
- Tutorial: https://docs.heyplzlookat.me/mehari/index.html#tutorial
- Issues: https://github.com/Psi-Prod/Mehari/issues
Building the unikernel
Setup dev environment:
$ opam install mehari-mirage solo5 ocaml-solo5
$ opam install ca-certs-nss dns dns-client mfat
$ opam pin zarith.dev git+https://github.com/mirage/Zarith.git#df8969d9bb95cffca13e31a615189ab27ada0684Vendor dependencies:
$ ./unikernel/vendor.shSetup network bridge:
$ ip link add name service type bridge
$ ip addr add 10.0.0.1/24 dev service
$ ip tuntap add name tap0 mode tap
$ ip link set tap0 master service
$ ip link set service up
$ ip link set tap0 upCreate dune and dune-workspace files at the root of the repo:
$ cat >dune<<EOF
(vendored_dirs vendors)
EOF
$ cat >dune-workspace<<EOF
(lang dune 3.23)
(context (default))
(context (default
(name solo5)
(host default)
(toolchain solo5)
(disable_dynamically_linked_foreign_archives true)))
EOF$ mfat make -s 2048 certs.img
$ mfat write certs.img key.pem key.pem
$ mfat write certs.img certs.pem cert.pemCompile and run the unikernel:
$ dune build --profile=release
$ solo5-hvt --net:service=tap0 --block:certs=certs.img -- ./_build/solo5/unikernel/unikernel.exe --solo5:quiet --ipv4=10.0.0.2/8License
Distributed under the LGPL-3.0 License. See license for more information.
Dependencies (11)
Dev Dependencies (7)
-
odoc
with-doc -
ocaml-lsp-server
with-dev-setup -
merlin
with-dev-setup -
ocp-indent
with-dev-setup -
ocamlformat
with-dev-setup -
utop
with-dev-setup -
alcotest
with-test
Optional Dependencies
None
Used by (2)
- mehari-miou
-
mehari-mirage
>= "0.5"
Conflicts
None
Build status
Results of building mehari with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.5 (this version) | n/a | n/a | n/a | n/a | good |
| 0.4 | n/a | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure