CosmOS - experimental operating system written in Rust.

Related tags

Cryptography cosmos
Overview

CosmOS

A simple operating system written in Rust.

Table of Contents

Setup

Linux

Arch

pacman -S qemu-desktop

Ubuntu

apt install qemu-system-x86

Windows

  • Install QEMU from here
  • Add toolchain
    rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
    
  • Install llvm
    rustup component add llvm-tools-preview 
    
  • Add qemu to PATH (example: C:\Program Files\qemu)

Run

This will build the kernel, create an image and launch it with qemu.

cargo run

OS dev resources

General

Bootloader

Comments
  • Implement text scrolling

    Implement text scrolling

    When we fill up the entire screen with text we'd like to move all the text one line up to make space for new lines. We'd need to shift all the bytes in vga::Writer's framebuffer using slice::copy_within.

    This is where we want this to happen: https://github.com/grupacosmo/cosmos/blob/32eb080ee293a5011423adcd129b2748963555a0/kernel/src/logger.rs#L75-L77

    good first issue 
    opened by wiktorwieclaw 1
  • implement text display

    implement text display

    • https://github.com/rust-osdev/bootloader/blob/main/common/src/framebuffer.rs
    • https://os.phil-opp.com/vga-text-mode/ - Note that our bootloader sets vga to graphics mode, not text mode
    opened by wiktorwieclaw 1
  • fix general protection fault after breakpoint

    fix general protection fault after breakpoint

    closing #19

    Double fault is raised when there is no handler setup for any other interrupt, so I added a bunch of handlers to find out what was causing the issue. It turns out it was general protection fault. I left the handlers in the PR as they will be useful in the future.

    Then I found solution in this comment that seems to fix the issue, so I implemented it and explained it (i can only hope that my explanation is correct lol)

    opened by wiktorwieclaw 0
  • add tests

    add tests

    I diverged from the way tests are implemented in blog_os:

    • Since we don't use bootimage, I had to implement our own runner. I based the implementation on bootloader's tests
    • I didn't include any way to run unit tests. They obfuscate kernel's code and I don't think we need them.

    The idea is simple. We have a test_kernel crate that communicates with qemu and allows us to freely customize everything (e.g panic handler for tests that should panic). Each test runs qemu with a different binary from test_kernel crate.

    btw I discovered that breakpoint interrupt handling doesn't work, I made a new issue https://github.com/grupacosmo/cosmos/issues/19

    opened by wiktorwieclaw 0
  • Handle double faults gracefully

    Handle double faults gracefully

    We want to avoid triple that cause the system to reset. We will need to setup interrupt handlers as explained in:

    1. https://os.phil-opp.com/cpu-exceptions/
    2. https://os.phil-opp.com/double-fault-exceptions/
    • [x] implementation
    • [ ] tests
    opened by wiktorwieclaw 0
  • Implement paging

    Implement paging

    Resolves #17

    The MemoryManager is useful when it comes to testing or abstracting operations that require both OffsetPageTable and BootInfoFrameAllocator.

    But registering it as singleton hidden behind Once<Mutex<..>> may be not very convenient.

    In future we will need MemoryManager inside alloc module or any other module that handles heap allocation.

    Saying so there will be no reason to use MemoryManager outside of alloc module. So we can pass MemoryManager directly to that module and provide Once<Mutex<MemoryManager>> only for test purposes (by using #[cfg] attribute).

    Feel free to provide your feedback.

    opened by 0xf4lc0n 0
  • add text escape sequences

    add text escape sequences

    • Add the ability to write "escape sequences" something similar to ANSI escape code. Each sequence/code should accessible as afunction and automatically processed in Logger::write_str.
    • Create documentation for the escape sequences codes (or refer to ANSI escape code and document which sequences are available)

    Something like

    pub fn set_fg_color(&mut self, color: Color) { ... }
    pub fn write_str(&mut self, s: &str) {
      if /* \eRED */ {
        self.set_color(Color::RED);
      }
      //...
    }
    

    I think we can implement the following:

    • Set text color (from predefined list of colors) -> #22
    • Set cursor position -> #21
    • Move cursor (aka set relative position) -> #21 ??
    opened by PatrykPaluch 0
Owner
COSMO PK Group
Science Club of Cracow University of Technology
COSMO PK Group
A template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

null 1 Mar 7, 2022
Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it

CoinSwap is a Smart Contract that is built on the terra blockchain and can be used to swap cryptocurrencies such as LUNA, UST, TerraUSD, Anchor, Mirror Protocol, LUNI and other CW20 tokens. The Project also contains a smart contract which works as a analysis tool for the gas fees on the Terra Blockchain.

Prajjwal Chittori 9 Oct 11, 2022
CosmWasm/Sylvia counting contract w/ IBC enabled (Cosmos, Rust, CosmWasm, Sylvia)

CosmWasm/Sylvia counting contract w/ IBC enabled (Cosmos, Rust, CosmWasm, Sylvia) This repository contains counting contract created during the study

Alex Cryp 3 Nov 13, 2023
Swap token protocol for cryptocurrencies, supported in cosmos network, such as UST, LUNA, LUNI, etc.

Tokenswap This is a Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it. To understand the framework better, ple

Smart Geek 6 Dec 12, 2022
Move VM for the Cosmos SDK

NovaVM Move VM for the Cosmos SDK. It allows you to compile, initialize and execute Move smart contracts from Go applications, in particular from x/mo

Kernel Labs 6 Oct 25, 2022
A library facilitating the signing and broadcasting of transactions on Cosmos SDK-based blockchains

txf Transaction factory - a library facilitating the signing and broadcasting of transactions (txs) on Cosmos SDK-based blockchains. How to use Exampl

larry 5 Jun 29, 2023
MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust

MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust

null 160 Dec 29, 2022
A certificate verification library for rustls that uses the operating system's verifier

rustls-platform-verifier A Rust library to verify the validity of TLS certificates based on the operating system's certificate facilities. On operatin

null 17 Dec 26, 2022
A certificate verification library for rustls that uses the operating system's verifier

rustls-platform-verifier A Rust library to verify the validity of TLS certificates based on the operating system's certificate facilities. On operatin

null 13 Nov 6, 2022
An experimental rust zksnarks compiler with embeeded bellman-bn128 prover

Za! An experimental port of the circom zk-SNARK compiler in Rust with embedded bellman-bn128 prover. I created it as a PoC port of the existing JavaSc

adria0.eth 39 Aug 26, 2022
Rust implementation of the Matter protocol. Status: Experimental

matter-rs: The Rust Implementation of Matter Build Building the library: $ cd matter $ cargo build Building the example: $ cd matter $ RUST_LOG="matt

Connectivity Standards Alliance 12 Jan 5, 2023
Avalanche primitive types in Rust (experimental)

AvalancheGo Compatibility Crate Version(s) AvalancheGo Version(s) Protocol Version v0.0.134-155 v1.9.2,v1.9.3 19 v0.0.156-176 v1.9.4 20 v0.0.177-200 v

Ava Labs 26 Feb 4, 2023
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022
Experimental binary transparency for pacman with sigstore and rekor

pacman-bintrans This is an experimental implementation of binary transparency for pacman, the Arch Linux package manager. This project was originally

null 80 Dec 23, 2022
Write Extism plugins in JavaScript (Experimental)

Extism JavaScript PDK Note: This is very experimental. If you are interested in helping or following development, join the #js-pdk room in our discord

Extism 6 Jan 18, 2023
An experimental fork of a16z's Helios Ethereum client which can run its network traffic over the Nym mixnet

Helios (Nym mixnet fork) Helios is a fully trustless, efficient, and portable Ethereum light client written in Rust. This fork of Helios includes nasc

Nym 4 Mar 3, 2023
Briolette is an experimental framework for researching offline digital currency designs.

Briolette - experimental framework for offline-enabled digital currency Briolette is an experimental framework for researching offline digital currenc

Google 39 Apr 9, 2023
experimental package manager for node.js

pacquet Experimental package manager for node.js written in rust. Disclaimer: This is mostly a playground for me to learn Rust and understand how pack

pnpm 349 Aug 22, 2023
Keyhouse is a skeleton of general-purpose Key Management System written in Rust.

Keyhouse Keyhouse is a skeleton of general-purpose Key Management System. Keyhouse is not an off-the-shelf system, and it's not ready for production.

Bytedance Inc. 148 Jan 1, 2023