Giter VIP home page Giter VIP logo

lilos's Introduction

lilos: A minimal async RTOS

This is a wee operating system written to support the async style of programming in Rust on microcontrollers. It fits in about 2 kiB of Flash and uses about 20 bytes of RAM (before your tasks are added). In that space, you get a full async runtime with multiple tasks, support for complex concurrency via join and select, and a lot of convenient but simple APIs. (If you want to see what a lilos program looks like, look in the examples directory, or read the intro guide.)

lilos has been deployed in real embedded systems since 2019, running continuously. I've built about a dozen systems around it of varying complexity, on half a dozen varieties of microcontroller. It works pretty okay! Perhaps you will find it useful too.

Repo layout

This repo contains crates in subdirectories, but it is not a Cargo workspace. This means you will need to cd into subdirectories to build things. Here is a map:

  • os contains the operating system crate.
  • testsuite contains a test suite for the operating system, which can run on a Cortex-M0 or better. See its README for instructions.
  • examples contains example programs for various microcontrollers.

Building

These instructions are mostly for building the examples or working on the operating system itself. If you're trying to use lilos in a program, the usual way is to just cargo add lilos to your application.

To build in the repo, you will need a Rust toolchain installed through rustup, because we use a rustup-style rust-toolchain.toml file to pin the toolchain version to ensure that you get the right results. rustup will automatically ensure you've got the appropriate toolchain version available, including support for the right target architecture for whatever program you're building.

  1. Enter the directory you're interested in, for example, cd os.
  2. Build: cargo build (or, for smaller binaries, cargo build --release).
  3. To try an example on a microcontroller eval board, see the README in the individual example. (In most cases cargo run in the directory will suffice.)

To build everything in the repo, run ./build-all.sh.

Contact and License

If you have questions, or you use it for something, I'd love to find out! Send me an email.

All the code in this repo is MPL-2 licensed.

lilos's People

Contributors

cbiffle avatar bkc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.