Skip to content
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

Merged
merged 6 commits into from
Jun 16, 2020
Merged

Add documentation #1168

merged 6 commits into from
Jun 16, 2020

Conversation

samoht
Copy link
Member

@samoht samoht commented Jun 16, 2020

No description provided.

@samoht
Copy link
Member Author

samoht commented Jun 16, 2020

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.

lib/mirage/mirage.mli Outdated Show resolved Hide resolved
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.
Copy link
Member

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?

Copy link
Member Author

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.

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
Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

lib/mirage/mirage.mli Outdated Show resolved Hide resolved
samoht and others added 3 commits June 16, 2020 11:15
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
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
Copy link
Member

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:
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good for me 👍.

@samoht
Copy link
Member Author

samoht commented Jun 16, 2020

Thanks for the reviews. More feedback is welcome as subsequent PRs.

@samoht samoht merged commit 4806c5f into mirage:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants