-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation #1168
Add documentation #1168
Conversation
This PR is trying to give an overview on how mirage libraries are organised and how the Mirage3 "compiler" works. /cc @mirage/core let me know if something is not clear enough. I'll add a few more details in the doc on the mirage+dune PR to explain the new compilation strategy. |
private key or the service being deployed). The `mirage`CLI tool uses all | ||
of these to {e generate a executable unikernel}: a specialised binary | ||
artefact containing only the code what is needed to run on the given | ||
deployment platform and no more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worth to mention that port and private keys etc. can as well be runtime boot parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That paragraph is already quite long, so I'm not sure how to add this succinctly.
lib/mirage/mirage.mli
Outdated
It is possible to write high-level MirageOS applications, such as HTTPS, | ||
email or CalDAV servers which can be deployed on very heterogenous and | ||
embedded platforms by changing only a few compilation parameters. The | ||
supported platforms range from ESP32 micro-controllers, minimal virtual |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you are targeting here -- if it is a description of the MirageOS tool (as released in 3.x series), I'd stay to the supported and implemented targets (I don't think the ESP32 target is merged and released)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
lib/mirage/mirage.mli
Outdated
and (ab)using | ||
{{:https://github.com/ocaml/opam-repository/blob/master/packages/zarith-xen/zarith-xen.1.7/files/mirage-install.sh#L20} | ||
ocamlfind predicates} to resolve link time depencencies for C archives and | ||
on relying on the now deprecated [--output-obj] option of the OCaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, --output-obj
is not really deprecated where a discussion still exists on this specific point here: ocaml/ocaml#1351. Then, the dune
team decided to use --output-complete-obj
ocaml/dune#23 in the same time.
{2 MirageOS as a cross-compilator} | ||
|
||
The MirageOS compiler is basically a cross-compiler, where the host and | ||
target toolchain are identical, but with different flags for the C bindings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe refer to the used pkg-config here? i.e. that CFLAGS are passed from the lowest layers via pkg-config files and invocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a mention of pkg-config
and ocamlfind
as tools needed to correctly handle the cross-compilation is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to complete that section with more information about pkg-config and ocamlfind predicates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good for me 👍.
Thanks for the reviews. More feedback is welcome as subsequent PRs. |
No description provided.