Skip to content

Commit aee9a91

Browse files
Dan Crossdancrossnyc
authored andcommitted
omnibus documentation changes
Hypatia is way behind on documentation. Start trying to flesh more of it out; this is not super organized, and covers a number of general topics. Signed-off-by: Dan Cross <cross@gajendra.net>
1 parent 7b31342 commit aee9a91

File tree

4 files changed

+112
-7
lines changed

4 files changed

+112
-7
lines changed

docs/hdp/0000/README.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Hypatia Design Proposals
66
========================
77

8-
Hypatia is described using a set of design proposals.
9-
These loosely follow the Oxide RFD format, and are
10-
in `asciidoc`.
8+
Hypatia is described using a set of design proposals. These
9+
loosely follow the Oxide RFD format, and are in `asciidoc` or
10+
`markdown`.
1111

1212
They go through states:
1313

@@ -18,3 +18,7 @@ They go through states:
1818
* abandoned
1919
2020
We use a consensus model.
21+
22+
TODO(cross): It would be nice to have some mechanism for
23+
hierarchical documents to aid discoverability and keeping things
24+
up to date.

docs/hdp/0001/README.adoc

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,101 @@
55
Hypatia Engineering Processes
66
=============================
77

8-
Discuss engineering processes used in Hypatia.
8+
Hypatia code is collaboratively developed using a standard set
9+
of open source tools:
10+
11+
* Revision control uses the https://git-scm.org[`git`] source
12+
control tool
13+
* The system is hosted on
14+
https://github.com/hypatia-hypervisor/hypatia.git[Github]
15+
* We use the github pull-request model and code review tools
16+
for collaborative development
17+
* The bulk of the software is written in Rust, with some parts
18+
written in assembly language.
19+
20+
Prerequisites
21+
-------------
22+
To work on Hypatia, one must first install a small set of
23+
prerequisites. Notably, one must install the `git` tools for
24+
revision control, and the Rust toolchain. Consult your local
25+
system documentation for the preferred way to install `git`;
26+
most engineers use the https://rustup.sh[`rustup`] tool to
27+
maintain the Rust installation.
28+
29+
It can be very useful to install `qemu` for testing. Again,
30+
consult your local package manager documentation for details.
31+
32+
Source Control
33+
--------------
34+
The source code is hosted under the `hypatia-hypervisor` project
35+
on Github, in the `hypatia` repository; the canonical repository
36+
location is:
37+
38+
https://github.com/hypatia-hypervisor/hypatia.git
39+
40+
To check out the code, one may use:
41+
42+
```
43+
git clone https://github.com/hypatia-hypervisor/hypatia.git
44+
```
45+
46+
Building Hypatia
47+
----------------
48+
We use the `cargo` tool with the `xtask` polyfill to build most
49+
the system. Run,
50+
51+
```
52+
cargo xtask --help
53+
```
54+
55+
to see what subcommands are available and their options.
56+
Highlights include,
57+
58+
`cargo xtask build`:: Builds hypatia
59+
`cargo xtask test`:: Run unit tests
60+
`cargo xtask qemu`:: Boot hypatia under qemu (requires KVM)
61+
`cargo xtask clippy`:: Run the `clippy` linter
62+
63+
Additionally, the `cargo check` command is supported for editor integration.
64+
65+
Documentation
66+
-------------
67+
Hypatia is documented in Hypatia Design Proposals, or HDPs ---
68+
like the one that you are currently reading. These are either
69+
Markdown or asciidoc source files in numbered subdirectories
70+
under the `docs` directory in the repository root.
71+
72+
General Development Workflows
73+
-----------------------------
74+
The Hypatia repository follows a linear history model; changes
75+
are rebased onto the `main` branch.
76+
77+
In general, one will do local development in a branch of their
78+
choosing, and, once they feel that they are ready for a commit
79+
they will submit a pull request for integration into `main`.
80+
All non-trivial changes must be reviewed and approved by another
81+
engineer. There is also continuous integration support that
82+
runs workflows that enforce that code is lint-free,
83+
well-formatted, and that all tests pass.
84+
85+
Each commit should have a well-written, grammatically correct
86+
change message that gives a high-level overview of commit's
87+
contents and the purpose of the change. Commit messages may
88+
freely reference Github issues, mark things as fixed, etc. All
89+
commits must be signed-off by the author (`git -s`).
90+
91+
Multi-commit changes are allowed. However, each commit should
92+
stand alone in the sense that compiles and passes all tests, and
93+
the commits in the pull request should be logically related.
94+
Put colloquially, the commits in a request should "tell a
95+
story." Each such commit must be separately signed-off on.
96+
97+
A common development practice is to do rough development work in
98+
a `wip` branch, committing frequently, possibly with less than
99+
stellar commit messages, and then squash-merge this the result
100+
into one or more commits with proper commit messages in a new
101+
branch when ready for sending a PR: this gives a developer
102+
flexibility to checkpoint their work often, be experimental, and
103+
generally explore the problem space before committing to a
104+
stable solution, while also keeping the overall commit history
105+
clean.

docs/hdp/0002/README.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ resource allocation, runs device drivers, etc.
4343

4444
Driver VM::
4545
A special class of VM provided to run a device driver and
46-
provide services to the hypervisor, but not provide general
46+
provide services to the hypervisor, but does not provide general
4747
computation.
4848

4949
Segment::
@@ -73,4 +73,8 @@ A transfer vector is a jump table at some well-known location
7373
relative to the start of a segment. That is, it is a table
7474
indexed by a function identifier that points to executable code
7575
within a segment. One may think of it as an array of function
76-
pointers.
76+
pointers. Transfer vectors allow for inter-segment linkage and
77+
function calls into the segment from e.g. tasks or other
78+
segments. These are deliberately chosen, as opposed to other,
79+
more traditional forms of linkage, to keep the interfaces
80+
exposed by segments small and decoupled.

docs/hdp/0003/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Tasks
1616
A task is the basic unit of scheduling in Hypatia; it is
1717
conceptually similar to a thread, but exists in its own address
1818
space. In this sense, it is similar to a process, but tasks are
19-
cooperatively scheduled by explicit calls into a scheduler
19+
cooperatively scheduled by explicit calls into the scheduler
2020
segment.
2121

2222
The set of tasks is small and all tasks are written in such a

0 commit comments

Comments
 (0)