#run-time #motor #moturus #os #motor-os #rt #thread

nightly moto-rt

Motor OS Runtime

1 unstable release

0.1.0 Dec 7, 2024

#333 in Unix APIs

Download history 23/week @ 2024-12-01 143/week @ 2024-12-08

166 downloads per month

MIT/Apache

89KB
2.5K SLoC

This repo is part of the Motūrus (Motor OS) project.

https://github.com/moturus/motor-os


lib.rs:

Motor OS Runtime Library. It is a stub/proxy to Motor OS Runtime VDSO (Virtual Dynamic Shared Object) which is loaded into every userspace process.

The Runtime API surface is explicitly designed to provide Rust standard library PAL (platform abstraction layer); while it may evolve later into a more universal Runtime API (e.g. to be used in Go runtime, Java runtime, libc, etc.), at the moment only supporting Rust Standard Library PAL is on the roadmap.

Note: RT.VDSO is a "fat" runtime: it creates an IO thread to interact with sys-io, and stdio threads to provide stdin/stdout/stderr abstractions, if needed.

While it is possible to do everything RT.VDSO does by directly interacting with the OS kernel and sys-io, there are two main benefits of using a VDSO and this RT library as its proxy:

  • simplified integration with Rust Standard Library: instead of a "fat" Motor OS PAL that needs heavy maintenance, this "thin" RT library is designed to be relatively stable, even if the underlying system code and runtime undergo extensive changes;
  • OS/runtime updates are automatically picked up by existing/compiled binaries without recompilation; while this is common in Windows and Linux with dll/so libraries, this benefit is worth mentioning here, as Motor OS, which is based on Rust, does not support dynamic libraries, as Rust does not support them "natively" (as in rdylib).

Dependencies

~205KB