Ernestas Poškus

Technical blog

"We must view with profound respect the infinite capacity of the human mind to resist the introduction of useful knowledge." - Thomas R. Lounsbury

| github | goodreads | linkedin | twitter |

ansible 2 / elasticsearch 2 / kernel 2 / leadership 1 / linux 2 / mnemonics 1 / nginx 1 / paper 40 / personal 5 / rust 1 / tools 2 /

Ownership is theft experiences building an embedded os in rust

WC 208 / RT 1min

Embedded OS in Rust

Embedded systems:


Rust, a new systems programming language, provides compile-time memory safety checks to help eliminate runtime bugs that manifest from improper memory management.

Rust’s ownership model prevents otherwise safe resource sharing common in the embedded domain, conflicts with the reality of hardware resources, and hinders using closures for programming asynchronously.

Rust achieves memory and type safety without garbage collection by using mechanism, derived from affine type and unique pointers, called ownership.

Preserved type safety without relying on a runtime GC for memory management.

Allows the programmer to explicitly separate code which is strictly bound to the type system from code which may subvert it.


Execution context (extension for Rust)

Reflects the thread of a value’s owner in its type.

Allows multiple borrows of a value from within same thread, but not across threads.

The goal of execution context is to allow program mutably borrow values multiple times as long as those borrows are never shared between threads.