9 unstable releases (3 breaking)

new 0.5.0 Jan 17, 2025
0.4.1 Jan 15, 2025
0.3.3 Jan 14, 2025
0.1.1 Nov 14, 2024

#195 in Operating systems

Download history 1/week @ 2024-09-27 16/week @ 2024-11-01 375/week @ 2024-11-08 63/week @ 2024-11-15 14/week @ 2024-11-22 1/week @ 2024-12-13 426/week @ 2025-01-10

426 downloads per month

MIT license

59KB
1.5K SLoC

K-Scale OS

Welcome to the K-Scale Operating System!

Building

Prerequisites

  • cross toolchain

You can install cross by running:

cargo install cross

Native build

Native build:

cargo build

You can run the kos-stub endpoint for testing purposes using the command:

cargo run --bin kos-stub

After doing this, you can test the endpoint using the pykos client:

import pykos

client = pykos.KOS("127.0.0.1")

Cross build

Cross build for kbot:

cross build --release --target aarch64-unknown-linux-gnu

Running

RUST_LOG=debug cargo run

You can specify logging levels for individual modules by adding module_name=log_level to the RUST_LOG environment variable. For example:

RUST_LOG=debug,krec=warn cargo run

List of features (--features / -F flag)

Features are how you specify the specific platform to run K-OS on (e.g. -F kos-kbot when running on K-Bot)

  • kos-kbot
  • zeroth-01 (not finished)
  • sim (not finished)

Adding a new embodiment

Reference the existing platforms / features in platforms.

You essentially create another package (Cargo.toml, lib.rs, etc) with the necessary actuator and imu implementations according to the specifications in kos-core

To save trace logs to a file, pass the --log flag:

cargo run -- --log

Contributing

  • Use cargo fmt --all to format the code.
  • Use cargo clippy to check for lint errors.
  • Use cargo test to run the tests.
  • Use tracing for logging.
  • Use eyre to handle errors.
  • No unwrap() or expect().

License

This project is licensed under the MIT License. See the LICENSE file for details.

Dependencies

~19–31MB
~460K SLoC