Skip to content

Commit

Permalink
more uniformity
Browse files Browse the repository at this point in the history
  • Loading branch information
mor1 committed Jul 18, 2015
1 parent 513fa3a commit 5025ad4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions tmpl/wiki/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ let main =
foreign "Unikernel.Main" (console @-> job)
let () =
register "console" [
main $ default_console
]
register "console" [main $ default_console]
```

The configuration file is a normal OCaml module that calls `register` to create
Expand Down Expand Up @@ -280,15 +278,14 @@ onto local files. The `config.ml` for the block example looks like this:
```
open Mirage
let main = foreign "Unikernel.Main" (console @-> block @-> job)
let img = match get_mode () with
| `Xen -> block_of_file "xvda1"
| `Unix | `MacOSX -> block_of_file "disk.img"
let () =
let main = foreign "Unikernel.Block_test" (console @-> block @-> job) in
let img = match get_mode () with
| `Xen -> block_of_file "xvda1"
| `Unix | `MacOSX -> block_of_file "disk.img"
in
register "block_test" [
main $ default_console $ img
]
register "block_test" [main $ default_console $ img]
```

The `main` binding looks much like the earlier console example, except for the
Expand Down Expand Up @@ -892,7 +889,6 @@ ARP: timeout 10.0.0.1
(The last line will be displayed after a delay dependent on the ARP timeout
setting.)


#### Xen

At this point, recompiling a Xen unikernel is pretty straightforward. The
Expand Down

0 comments on commit 5025ad4

Please sign in to comment.