An ownership model that is used to replace the Ring in Linux.

Overview

std-ownership

Build Status Rust Benchmark Discord chat

An ownership model that is used to replace the Ring in Linux. It's 10x faster than Ring in Syscall.

Overview

The ownership system allows users to customize safety checks to guarantee system and application security.

Quick Start

In the examples module, you can run

cargo run --example ownership

API

If you'd like to customize checks to forbid other applications from directly accessing "mysql.ibd", you can implement trait Resource for MySQL like below:

#[derive(Debug, Clone, Copy)]
pub struct MySQL<'a> {
    sys_files: &'a str,
    disk: Disk
}

impl<'a> MySQL<'a> {
    #[must_use]
    pub fn new() -> Self {
        Self { 
            sys_files: "mysql.ibd",
            disk: Disk::new(1024)
        }
    }

    #[inline]
    pub fn sys_files(&self) -> &'a str {
        &self.sys_files
    }

    #[inline]
    pub fn disk(&self) -> Disk {
        self.disk
    }
}

impl<'a> Resource for MySQL<'a> {
    #[inline]
    fn id(&self) -> u8 {
        3 //it will be replaced with auto id
    }

    #[inline]
    fn check(&self, table_name: &[u8]) -> bool {
        if !self.disk().check(table_name) {
            return false;
        }
        for file in self.sys_files().split(',').collect::<Vec<&str>>() {
            if file == str::from_utf8(table_name).unwrap() {
                return false;
            }
        }
        true
    }
}

Performance

1w Concurrency

It's surprising! The ownership model is 10x faster than Ring in Syscall.

Ownership Borrow:

ownership

Geteuid(Syscall):

geteuid

You might also like...
Elton is a benchmark utility written in rust aimed to be used to benchmark HTTP calls.

Elton Elton is an HTTP Benchmark utility with options to be used within an HTTP interface. Installation Elton is currently available via Docker or by

qfetch is a tool that fetches info about your linux install.

qfetch qfetch is a tool that fetches info about your linux install. Status Dependencies /proc/meminfo with the following fields: MemTotal in the 1st l

API for the creation character based games in Linux.
API for the creation character based games in Linux.

Console Game Engine for Linux. API for the creation of character based games in Linux. The inspiration came from the olcConsoleGameEngine. This is my

Streaming I/O for Linux built on DMA Buffers

dmastorage High-performance I/O for Linux based on DMA Buffers ALPHA QUALITY SOFTWARE Warning DmaStorage is still just a concept and shouldn't be used

A tiny Rust std-lib for Linux x86_64 and aarch64

Tiny std Like a bad, probably buggy, tiny standard library for Linux. When it's appropriate If you are actually trying to do something solid, checkout

Linux daemon to bind keys and macros to your controller's buttons

makima Makima is a daemon for Linux to bind your controller's buttons to key sequences and macros. Features: Configure your keybindings through a simp

Open source bible study program on Linux!
Open source bible study program on Linux!

Open Witness Library Open Witness Library is a program to read articles that carries God's true name. Warning This branch is outdated, please refer to

Blazing fast, memory safe & modern Linux package manager written in Rust.

paket Blazing fast, memory safe & modern Linux package manager written in Rust. Roadmap Version: 0.1 Paket.toml file parsing. (#1, #2) CLI handling (p

Rust-based linux reverse shell listener.
Rust-based linux reverse shell listener.

Catch Rust-based linux reverse shell listener. Installation TODO: fix this installation guide, but this kinda works: mkdir /opt/catch/ cd /opt/catch/

Owner
Rhodes
Building next-generation super computing operating system
Rhodes
A Platform-less, Runtime-less Actor Computing Model

CrossBus A Platform-Less, Runtime-Less Actor Computing Model Overview CrossBus is an implementation of Actor Computing Model, with the concept that Ru

Bruce Yuan 105 Apr 8, 2023
Construct complex structures within single call + simple compile-time meta-inheritance model with mixins.

Introduction constructivism is a Rust sample-library designed to simplify the construction of structured data by defining and manipulating sequences o

polako.rs 5 Oct 24, 2023
:crab: Small exercises to get you used to reading and writing Rust code!

rustlings ?? ❤️ Greetings and welcome to rustlings. This project contains small exercises to get you used to reading and writing Rust code. This inclu

The Rust Programming Language 33.1k Jan 2, 2023
Core Temporal SDK that can be used as a base for language specific Temporal SDKs

Core SDK that can be used as a base for all other Temporal SDKs. Getting started See the Architecture doc for some high-level information. This repo u

temporal.io 136 Dec 21, 2022
Rust 核心库和标准库的源码级中文翻译,可作为 IDE 工具的智能提示 (Rust core library and standard library translation. can be used as IntelliSense for IDE tools)

Rust 标准库中文版 这是翻译 Rust 库 的地方, 相关源代码来自于 https://github.com/rust-lang/rust。 如果您不会说英语,那么拥有使用中文的文档至关重要,即使您会说英语,使用母语也仍然能让您感到愉快。Rust 标准库是高质量的,不管是新手还是老手,都可以从中

wtklbm 493 Jan 4, 2023
This project contains small exercises to get you used to reading and writing Rust code

rustlings ?? ❤️ Greetings and welcome to rustlings. This project contains small exercises to get you used to reading and writing Rust code. This inclu

Cynthia Tran 1 May 24, 2022
A set of Zero Knowledge modules, written in Rust and designed to be used in other system programming environments.

Zerokit A set of Zero Knowledge modules, written in Rust and designed to be used in other system programming environments. Initial scope Focus on RLN

vac 44 Dec 27, 2022
A relatively simple puzzle generator application written in Rust and used via Javascript

Puzzlip Basic Overview This is a relatively simple puzzle generator application written in Rust and used via Javascript in https://puzzlip.com. If you

Nenad 5 Dec 7, 2022
This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone.

Comprehensive Rust ?? This repository has the source code for Comprehensive Rust ?? , a four day Rust course developed by the Android team. The course

Google 5.2k Jan 3, 2023
🦀 Rust crate that allows creating weighted prefix trees that can be used in autocomplete

weighted_trie ?? Rust crate that allows creating weighted prefix trees that can be used in autocomplete Released API Docs Quickstart To use weigthed-t

Alexander Osipenko 8 Mar 1, 2023