praborrow

Crates.iopraborrow
lib.rspraborrow
version1.2.2
created_at2026-01-09 15:08:44.972745+00
updated_at2026-01-14 03:31:44.947995+00
descriptionThe PraBorrow framework - A distributed systems framework for Rust
homepage
repositoryhttps://github.com/ireddragonicy/PraBorrow
max_upload_size
id2032225
size79,416
Ndik (IRedDragonICY)

documentation

README

PraBorrow

PraBorrow Banner

Crates.io License: MIT

The PraBorrow Framework - A distributed systems framework for Rust that enforces memory safety guarantees across network boundaries.

"Memory safety with sovereign integrity."

Overview

PraBorrow extends Rust's ownership model to distributed systems, providing:

  • Sovereign<T> - Wrapper type that tracks ownership across nodes
  • Constitution - Derive macro for invariant enforcement
  • RawResource - Zero-copy buffer management
  • Leasing - Time-bounded resource sharing

Quick Start

[dependencies]
praborrow = "0.2"
use praborrow::prelude::*;

#[derive(Constitution)]
struct Account {
    #[invariant("self.balance >= 0")]
    balance: i64,
}

fn main() {
    let account = Sovereign::new(Account { balance: 100 });
    
    // Access is safe while domestic
    println!("Balance: {}", account.balance);
    
    // Annex moves resource to foreign jurisdiction
    account.annex().unwrap();
    
    // Further access would panic with "SOVEREIGNTY VIOLATION"
}

Crates

Crate Description
praborrow-core Core primitives: Sovereign<T>, CheckProtocol
praborrow-defense #[derive(Constitution)] macro
praborrow-logistics Zero-copy RawResource buffers
praborrow-diplomacy Networking protocols
praborrow-lease Distributed leasing
praborrow-prover SMT-based formal verification

License

MIT License - See LICENSE


PraBorrow (Bahasa Indonesia)

The PraBorrow Framework - Sebuah framework sistem terdistribusi untuk Rust yang menegakkan jaminan keamanan memori (memory safety) lintas batas jaringan.

"Keamanan memori dengan integritas kedaulatan (sovereign integrity)."

Ikhtisar (Overview)

PraBorrow memperluas model kepemilikan (ownership model) Rust ke sistem terdistribusi, menyediakan:

  • Sovereign<T> - Tipe wrapper yang melacak kepemilikan antar node.
  • Constitution - Macro derive untuk penegakan invarian.
  • RawResource - Manajemen buffer zero-copy.
  • Leasing - Pembagian sumber daya dengan batas waktu.

Memulai Cepat (Quick Start)

[dependencies]
praborrow = "0.9.0"
use praborrow::prelude::*;

#[derive(Constitution)]
struct Account {
    #[invariant("self.balance >= 0")]
    balance: i64,
}

fn main() {
    let account = Sovereign::new(Account { balance: 100 });
    
    // Akses aman selama statusnya domestic
    println!("Saldo: {}", account.balance);
    
    // Annex memindahkan sumber daya ke yurisdiksi asing
    account.annex().unwrap();
    
    // Akses lebih lanjut akan memicu panic dengan "SOVEREIGNTY VIOLATION"
}

Crate

Crate Deskripsi
praborrow-core Primitif inti: Sovereign<T>, CheckProtocol
praborrow-defense Macro #[derive(Constitution)]
praborrow-logistics Buffer RawResource zero-copy
praborrow-diplomacy Protokol jaringan
praborrow-lease Leasing terdistribusi
praborrow-prover Verifikasi formal berbasis SMT

Lisensi (License)

Lisensi MIT - Lihat LICENSE

Commit count: 113

cargo fmt