Skip to content

organix/uFork

Repository files navigation

μFork

A pure-actor virtual machine with object-capabilities and memory-safety. The uFork processor architecture features instruction-level concurrency, automatic memory-management, and fine-grained resource limits.

μFork logo

The blog post "Memory Safety Simplifies Microprocessor Design" describes the high-level architecture, and the rationale behind it.

uFork Rust/WASM debugger

Implementations

The initial prototype was implemented in C and hosts a Scheme REPL with actor extensions.

The Rust/WASM version is a newer and more-robust implementation. Multiple instances of the WASM component can be instantiated to simulate a multi-core or distributed system.

An FPGA implementation is in development.

Technology Stacks

+-----+--------+-------+-------+---------+-------------+
| ASM | Scheme | Humus | Misty | ...     | Scheme REPL |
|-----+--------+-------+-------+---------|-------------|
| uFork-CRLF intermediate representation | uFork VM    |
|========================================|=============|
| Rust (no-std)                | Verilog | C           |
|------+-----+--------+--------|---------|-------------|
| WASM | ARM | RISC-V | Xtensa | FPGA    | Host O/S    |
+------+-----+--------+--------+---------+-------------+

The C proof-of-concept was built to run in a traditional hosted O/S environment, and does not track the evolving semantics of the uFork IR (intermediate representation).

The Rust implementation (and eventually the Verilog) conforms to a common uFork IR semantics. The Rust code-base currently targets WASM, but it should be possible to compile the core for a variety of other Rust target platforms. The future Verilog implementation will target small FPGA devices as a secure soft-core processor.

There is currently an assembler that generates uFork IR from a textual ASM format. A compiler for a dialect of Scheme with actor-oriented extensions also generates uFork IR. A univeral linker/loader produces uFork memory images from uFork IR. Modules in uFork IR can import and export symbols regardless of their original source language. Additional languages can be supported by generating interoperable uFork IR.

How To Run

Install the Nix package manager and run nix-shell from the root of this repository. Alternatively, manually install the relevant packages listed in shell.nix.

Available Deno tasks are declared in deno.json. They are:

  • deno task build: Build the WASM component.
  • deno task serve: Start an HTTP server to locally host Web applications, such as the uFork debugger. Equivalent to starting Replete from your editor.
  • deno task test: Run the project's tests.

Documentation

License

Apache License, Version 2.0

Project Support

Logo NLnet: abstract logo of four people seen from above

Logo NGI Zero: letterlogo shaped like a tag

This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.

About

A pure-actor virtual machine with object-capabilities and memory-safety.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published