Skip to content

Commit d771dea

Browse files
authored
[documentation] recenter logo on README (#67)
* [documentation] recenter logo on README Signed-off-by: danbugs <danilochiarlone@gmail.com> * [documentation] reverting to "align" attribute GitHub markdown doesn't allow using styles, so we need to rely on the obsolote attribute to center the logo Signed-off-by: danbugs <danilochiarlone@gmail.com> --------- Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent a38396b commit d771dea

File tree

1 file changed

+52
-31
lines changed

1 file changed

+52
-31
lines changed

README.md

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
<div style="display: grid; place-items: center;">
2-
<h1>Hyperlight</h1>
3-
<img src="https://raw.githubusercontent.com/hyperlight-dev/hyperlight/refs/heads/main/docs/assets/hyperlight-logo.png" width="150px" alt="hyperlight logo"/>
4-
<p>
5-
<strong>Hyperlight is a lightweight Virtual Machine Manager (VMM) designed to be embedded within applications. It enables safe execution of untrusted code within <i>micro virtual machines</i> with very low latency and minimal overhead.
6-
</strong>
7-
</p>
1+
<div align="center">
2+
<h1>Hyperlight</h1>
3+
<img src="https://raw.githubusercontent.com/hyperlight-dev/hyperlight/refs/heads/main/docs/assets/hyperlight-logo.png" width="150px" alt="hyperlight logo"/>
4+
<p><strong>Hyperlight is a lightweight Virtual Machine Manager (VMM) designed to be embedded within applications. It enables safe execution of untrusted code within <i>micro virtual machines</i> with very low latency and minimal overhead.</strong></p>
85
</div>
96

10-
> Note: Hyperlight is a nascent project with an evolving API and no guaranteed support. Assistance is provided on a best-effort basis by the developers.
7+
> Note: Hyperlight is a nascent project with an evolving API and no guaranteed support. Assistance is provided on a
8+
> best-effort basis by the developers.
119
1210
---
1311

1412
## Overview
1513

16-
Hyperlight is a library for creating _micro virtual machines_ — or _sandboxes_ — specifically optimized for securely running untrusted code with minimal impact. It supports both Windows and Linux, utilizing [Windows Hypervisor Platform](https://docs.microsoft.com/en-us/virtualization/api/#windows-hypervisor-platform) on Windows, and either Microsoft Hypervisor (mshv) or [KVM](https://linux-kvm.org/page/Main_Page) on Linux.
14+
Hyperlight is a library for creating _micro virtual machines_ — or _sandboxes_ — specifically optimized for securely
15+
running untrusted code with minimal impact. It supports both Windows and Linux,
16+
utilizing [Windows Hypervisor Platform](https://docs.microsoft.com/en-us/virtualization/api/#windows-hypervisor-platform)
17+
on Windows, and either Microsoft Hypervisor (mshv) or [KVM](https://linux-kvm.org/page/Main_Page) on Linux.
1718

18-
These micro VMs operate without a kernel or operating system, keeping overhead low. Instead, guests are built specifically for Hyperlight using the Hyperlight Guest library, which provides a controlled set of APIs that facilitate interaction between host and guest:
19+
These micro VMs operate without a kernel or operating system, keeping overhead low. Instead, guests are built
20+
specifically for Hyperlight using the Hyperlight Guest library, which provides a controlled set of APIs that facilitate
21+
interaction between host and guest:
1922

2023
- The host can call functions implemented and exposed by the guest (known as _guest functions_).
2124
- Once running, the guest can call functions implemented and exposed by the host (known as _host functions_).
2225

23-
By default, Hyperlight restricts guest access to a minimal API. The only _host function_ available by default allows the guest to print messages, which are displayed on the host console or redirected to stdout, as configured. Hosts can choose to expose additional host functions, expanding the guest’s capabilities as needed.
26+
By default, Hyperlight restricts guest access to a minimal API. The only _host function_ available by default allows the
27+
guest to print messages, which are displayed on the host console or redirected to stdout, as configured. Hosts can
28+
choose to expose additional host functions, expanding the guest’s capabilities as needed.
2429

25-
Below is an example demonstrating the use of the Hyperlight host library in Rust to execute a simple guest application and an example of a simple guest application using the Hyperlight guest library in also written in Rust.
30+
Below is an example demonstrating the use of the Hyperlight host library in Rust to execute a simple guest application
31+
and an example of a simple guest application using the Hyperlight guest library in also written in Rust.
2632

2733
### Host
2834

@@ -130,34 +136,38 @@ pub fn guest_dispatch_function(function_call: FunctionCall) -> Result<Vec<u8>> {
130136
ErrorCode::GuestFunctionNotFound,
131137
function_name,
132138
));
133-
134139
}
135140
```
136141

137-
For additional examples of using the Hyperlight host Rust library, see the [./src/hyperlight_host/examples](./src/hyperlight_host/examples) directory.
142+
For additional examples of using the Hyperlight host Rust library, see
143+
the [./src/hyperlight_host/examples](./src/hyperlight_host/examples) directory.
138144

139-
For examples of guest applications, see the [./src/tests/c_guests](./src/tests/c_guests) directory for C guests and the [./src/tests/rust_guests](./src/tests/rust_guests) directory for Rust guests.
145+
For examples of guest applications, see the [./src/tests/c_guests](./src/tests/c_guests) directory for C guests and
146+
the [./src/tests/rust_guests](./src/tests/rust_guests) directory for Rust guests.
140147

141148
> Note: Hyperlight guests can be written using the Hyperlight Rust or C Guest libraries.
142149
143150
## Repository Structure
144151

145152
- Hyperlight Host Libraries (i.e., the ones that create and manage the VMs)
146-
- [src/hyperlight_host](./src/hyperlight_host) - This is the Rust Hyperlight host library.
153+
- [src/hyperlight_host](./src/hyperlight_host) - This is the Rust Hyperlight host library.
147154

148155
- Hyperlight Guest Libraries (i.e., the ones to make it easier to create guests that run inside the VMs)
149-
- [src/hyperlight_guest](./src/hyperlight_guest) - This is the Rust Hyperlight guest library.
150-
- [src/hyperlight_guest_capi](./src/hyperlight_guest_capi) - This is the C compatible wrapper for the Hyperlight guest library.
156+
- [src/hyperlight_guest](./src/hyperlight_guest) - This is the Rust Hyperlight guest library.
157+
- [src/hyperlight_guest_capi](./src/hyperlight_guest_capi) - This is the C compatible wrapper for the Hyperlight
158+
guest library.
151159

152160
- Hyperlight Common (functionality used by both the host and the guest)
153-
- [src/hyperlight_common](./src/hyperlight_common)
161+
- [src/hyperlight_common](./src/hyperlight_common)
154162

155163
- Test Guest Applications:
156-
- [src/tests/rust_guests](./src/tests/rust_guests) - This directory contains three Hyperlight Guest programs written in Rust, which are intended to be launched within partitions as "guests".
157-
- [src/tests/c_guests](./src/tests/c_guests) - This directory contains two Hyperlight Guest programs written in C, which are intended to be launched within partitions as "guests".
164+
- [src/tests/rust_guests](./src/tests/rust_guests) - This directory contains three Hyperlight Guest programs written
165+
in Rust, which are intended to be launched within partitions as "guests".
166+
- [src/tests/c_guests](./src/tests/c_guests) - This directory contains two Hyperlight Guest programs written in C,
167+
which are intended to be launched within partitions as "guests".
158168

159169
- Tests:
160-
- [src/hyperlight-testing](./src/hyperlight_testing) - Shared testing code for Hyperlight projects built in Rust.
170+
- [src/hyperlight-testing](./src/hyperlight_testing) - Shared testing code for Hyperlight projects built in Rust.
161171

162172
## Try it yourself!
163173

@@ -170,10 +180,13 @@ You can run Hyperlight on:
170180

171181
After having an environment with a hypervisor setup, running the example has the following pre-requisites:
172182

173-
1. On Linux or WSL, you'll most likely need build essential. For Ubuntu, run `sudo apt install build-essential`. For Azure Linux, run `sudo dnf install build-essential`.
174-
2. [Rust](https://www.rust-lang.org/tools/install). Install toolchain v1.78.0 or later.
183+
1. On Linux or WSL, you'll most likely need build essential. For Ubuntu, run `sudo apt install build-essential`. For
184+
Azure Linux, run `sudo dnf install build-essential`.
185+
2. [Rust](https://www.rust-lang.org/tools/install). Install toolchain v1.78.0 or later.
175186

176-
Also, install the `x86_64-pc-windows-msvc` and `x86_64-unknown-none` targets, these are needed to build the test guest binaries. (Note: install both targets on either Linux or Windows: Hyperlight can load ELF or PE files on either OS, and the tests/examples are built for both):
187+
Also, install the `x86_64-pc-windows-msvc` and `x86_64-unknown-none` targets, these are needed to build the test
188+
guest binaries. (Note: install both targets on either Linux or Windows: Hyperlight can load ELF or PE files on either
189+
OS, and the tests/examples are built for both):
177190

178191
```sh
179192
rustup target add x86_64-unknown-none
@@ -220,27 +233,33 @@ If all worked as expected, you should see the following message in your console:
220233
Hello, World! I am executing inside of a VM :)
221234
```
222235

223-
If you get the error `Error: NoHypervisorFound` and KVM or mshv is set up then this may be a permissions issue. In bash, you can use `ls -l /dev/kvm` or `ls -l /dev/mshv` to check which group owns that device and then `groups` to make sure your user is a member of that group.
236+
If you get the error `Error: NoHypervisorFound` and KVM or mshv is set up then this may be a permissions issue. In bash,
237+
you can use `ls -l /dev/kvm` or `ls -l /dev/mshv` to check which group owns that device and then `groups` to make sure
238+
your user is a member of that group.
224239

225-
For more details on how to verify that KVM is correctly installed and permissions are correct, follow the guide [here](https://help.ubuntu.com/community/KVM/Installation).
240+
For more details on how to verify that KVM is correctly installed and permissions are correct, follow the
241+
guide [here](https://help.ubuntu.com/community/KVM/Installation).
226242

227243
### Or you can use a codespace
228-
244+
229245
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/hyperlight-dev/hyperlight)
230246

231247
## Contributing to Hyperlight
232248

233-
If you are interested in contributing to Hyperlight, running the entire test-suite is a good way to get started. To do so, on your console, run the following commands:
249+
If you are interested in contributing to Hyperlight, running the entire test-suite is a good way to get started. To do
250+
so, on your console, run the following commands:
234251

235252
```sh
236253
just guests # build the c and rust test guests
237254
just build # build the Hyperlight library
238255
just test # runs the tests
239256
```
240257

241-
Also , please review the [CONTRIBUTING.md](./CONTRIBUTING.md) file for more information on how to contribute to Hyperlight.
258+
Also , please review the [CONTRIBUTING.md](./CONTRIBUTING.md) file for more information on how to contribute to
259+
Hyperlight.
242260

243-
> Note: For general Hyperlight development, you may also need flatc (Flatbuffer compiler): for instructions, see [here](https://github.com/google/flatbuffers).
261+
> Note: For general Hyperlight development, you may also need flatc (Flatbuffer compiler): for instructions,
262+
> see [here](https://github.com/google/flatbuffers).
244263

245264
## More Information
246265

@@ -251,5 +270,7 @@ For more information, please refer to our compilation of documents in the [`docs
251270
See the [Code of Conduct](./CODE_OF_CONDUCT.md).
252271

253272
[wsl2]: https://docs.microsoft.com/en-us/windows/wsl/install
273+
254274
[kvm]: https://help.ubuntu.com/community/KVM/Installation
275+
255276
[whp]: https://devblogs.microsoft.com/visualstudio/hyper-v-android-emulator-support/#1-enable-hyper-v-and-the-windows-hypervisor-platform

0 commit comments

Comments
 (0)