Skip to content

Commit 4d9544a

Browse files
committed
address all the code reviews up to this point
1 parent 640c520 commit 4d9544a

File tree

5 files changed

+29
-10
lines changed

5 files changed

+29
-10
lines changed

data/tool_pages/platform/2ct_00_native.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ The native-code compiler is available only on 64-bit systems (OCaml 5.0+):
3333
- **ARM64 (AArch64)** - Linux, macOS (including Apple Silicon)
3434
- **RISC-V** - Linux
3535
- **IBM Z (s390x)** - Linux (OCaml 5.1+)
36+
- **PowerPC (PPC64)** - Linux
37+
38+
All native code platforms use **63-bit integers** (with 1 bit reserved for the garbage collector tag).
3639

3740
**Windows:** Native compilation is supported via MSVC, MinGW, or Cygwin toolchains. See [OCaml on Windows](https://ocaml.org/docs/ocaml-on-windows) for setup details.
3841

data/tool_pages/platform/2ct_01_bytecode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Bytecode provides several advantages over native compilation:
2323
- Predictable and consistent execution behavior
2424
- Easier debugging with built-in tools
2525

26+
The bytecode compiler can be built in either 32-bit or 64-bit mode, resulting in **31-bit or 63-bit integers**, respectively (with 1 bit reserved for the garbage collector tag).
27+
2628
## When to Use Bytecode
2729

2830
**Use bytecode** when you want fast compilation during development, need maximum portability, or are targeting platforms without a native code compiler.

data/tool_pages/platform/2ct_02_javascript.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ OCaml can compile to JavaScript, enabling you to write type-safe, high-performan
1717
- Excellent performance with compact output
1818
- Strong integration with existing JavaScript libraries
1919
- Access to browser APIs and DOM manipulation
20-
- Support for the full OCaml language, including advanced features
20+
- Support for the full OCaml language, including OCaml 5 effects
2121
- Compatibility with most OCaml libraries and the standard library
22+
- **32-bit integers** (JavaScript's bit operations are 32-bit)
23+
24+
**Note:** While Js_of_ocaml supports OCaml 5 effects, it has limited support for Domains (multicore parallelism).
2225

2326
Js_of_ocaml is ideal when you want to leverage existing OCaml code in web applications or need access to the complete OCaml ecosystem.
2427

data/tool_pages/platform/2ct_03_wasm.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ WebAssembly is a binary instruction format designed as a portable compilation ta
1818
## Available Tools
1919

2020
### wasm_of_ocaml
21-
[wasm_of_ocaml](https://github.com/ocaml-wasm/wasm_of_ocaml) compiles OCaml bytecode to WebAssembly. It provides:
22-
- Full OCaml language support, including the standard library
21+
[wasm_of_ocaml](https://github.com/ocsigen/js_of_ocaml/blob/master/README_wasm_of_ocaml.md) compiles OCaml bytecode to WebAssembly. It provides:
22+
- Full OCaml language support, including the standard library and OCaml 5 effects
2323
- Compatibility with existing OCaml libraries
2424
- Integration with JavaScript through Js_of_ocaml-style bindings
2525
- Ability to run OCaml code in browsers and WASM runtimes
2626
- Shared infrastructure with Js_of_ocaml for web development
27+
- **31-bit integers** (similar to traditional OCaml bytecode on 32-bit systems)
28+
29+
**Note:** While wasm_of_ocaml supports OCaml 5 effects, it has limited support for Domains (multicore parallelism).
2730

2831
wasm_of_ocaml is ideal when you want to leverage existing OCaml code with WebAssembly's performance characteristics while maintaining compatibility with the OCaml ecosystem.
2932

30-
Visit the [wasm_of_ocaml repository](https://github.com/ocaml-wasm/wasm_of_ocaml) to learn how to install and set up wasm_of_ocaml, compile OCaml programs to WebAssembly, interact with JavaScript APIs from WASM, and deploy WASM modules in web applications.
33+
Visit the [wasm_of_ocaml documentation](https://github.com/ocsigen/js_of_ocaml/blob/master/README_wasm_of_ocaml.md) in the Js_of_ocaml repository to learn how to install and set up wasm_of_ocaml, compile OCaml programs to WebAssembly, interact with JavaScript APIs from WASM, and deploy WASM modules in web applications.
3134

3235
### Wasocaml
3336
[Wasocaml](https://github.com/OCamlPro/wasocaml) is an OCaml compiler that targets WebAssembly GC (WASM-GC). Developed by OCamlPro, it provides:
@@ -36,6 +39,9 @@ Visit the [wasm_of_ocaml repository](https://github.com/ocaml-wasm/wasm_of_ocaml
3639
- Optimized performance through the Flambda optimizer
3740
- Support for functional programming language features in WebAssembly
3841
- First real-world functional language compiler targeting WASM-GC
42+
- **31-bit integers** (similar to traditional OCaml bytecode on 32-bit systems)
43+
44+
**Note:** Wasocaml is based on OCaml 4.14 and does not currently support OCaml 5 effects or multicore features.
3945

4046
Wasocaml is ideal when you need direct compilation to WebAssembly with garbage collection support and want to benefit from Flambda optimizations.
4147

data/tool_pages/platform/2ct_04_unikernels.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "Compile OCaml to specialized unikernel targets using MirageOS. Cre
66
category: "Compilation Targets"
77
---
88

9-
OCaml can compile to specialized unikernel targets through [MirageOS](https://mirage.io), a library operating system that creates secure, high-performance single-purpose applications.
9+
OCaml can compile to specialized unikernel targets through [MirageOS](https://mirage.io), a library operating system that creates secure, single-purpose applications.
1010

1111
## What are Unikernels?
1212

@@ -27,15 +27,18 @@ MirageOS supports compilation to several unikernel backends:
2727

2828
[Solo5](https://github.com/Solo5/solo5) is a sandboxed execution environment that provides multiple deployment options:
2929

30-
- **hvt** (Hardware Virtualized Tender) - Runs on KVM/Linux and bhyve/FreeBSD with minimal overhead
30+
- **hvt** (Hardware Virtualized Tender) - Runs on KVM/Linux, bhyve/FreeBSD, and vmm/OpenBSD with minimal overhead
3131
- **spt** (Sandboxed Process Tender) - Runs as a regular Unix process with seccomp sandboxing on Linux
3232
- **virtio** - Runs on standard virtio-based hypervisors including QEMU/KVM, Google Compute Engine, and OpenStack
3333
- **muen** - Runs on the Muen Separation Kernel
34-
- **genode** - Runs on the Genode OS framework
34+
- **xen** - Runs on the Xen hypervisor as a paravirtualized guest (PVHv2 mode)
3535

36-
### Xen
36+
### Unikraft Targets
3737

38-
- **xen** - Runs on the Xen hypervisor as a paravirtualized guest (PVHv2 mode)
38+
[Unikraft](https://unikraft.org) is a general Unikernel Development Kit that can be used as a MirageOS backend:
39+
40+
- **unikraft-qemu** - Runs on the [QEMU](https://www.qemu.org/) virtual machine monitor
41+
- **unikraft-firecracker** - Runs on the [Firecracker](https://firecracker-microvm.github.io/) virtual machine monitor
3942

4043
### Unix
4144

@@ -45,14 +48,16 @@ MirageOS supports compilation to several unikernel backends:
4548

4649
**Use Unix** when you're developing and testing your unikernel locally.
4750

48-
**Use hvt** when you want lightweight virtualization on Linux or FreeBSD with KVM or bhyve.
51+
**Use hvt** when you want lightweight virtualization on Linux, FreeBSD, or OpenBSD with KVM, bhyve, or vmm.
4952

5053
**Use virtio** when deploying to cloud providers like Google Compute Engine, or standard KVM/QEMU setups.
5154

5255
**Use spt** when you want process-level isolation on Linux without full virtualization.
5356

5457
**Use Xen** when deploying to Xen-based infrastructure or cloud providers that support Xen.
5558

59+
**Use Unikraft targets** when you want to use the Unikraft unikernel framework with QEMU or Firecracker.
60+
5661
## Getting Started
5762

5863
To start building unikernels with OCaml, visit the [MirageOS Getting Started Guide](https://mirage.io/docs/). The guide walks you through:

0 commit comments

Comments
 (0)