Rholang runtime in rust

Overview

Rholang Runtime

A rholang runtime written in Rust. Development is still in progress...

  • /model/ is a library crate containing protobuf models depended by rho_runtime and rholang_parser
  • /rholang_parser/ crate builds an executable program which accepts rholang code and outputs normalized AST
  • /rho_runtime/ is the primary executable program. It launches rholang_parser to parse rholang code, then handle reducing and storage

File Naming Convertion

Two kinds of naming convertions applied in this project.

  • Filename using snake_case (e.g. common.rs / rho_par.rs) means it is an individual module, which is the default approach in Rust's module system.
  • Filename using PascalCase (e.g. Sortable.rs / DeBruijnIndexMap.rs) means it is a part of its directory module.

The PascalCase style is used to keep the code structure similar as Scala edition without big single file or a lot of re-exports.

src/
├─ context/
│  ├─ mod.rs
│  ├─ DeBruijnLevelMap.rs
│  ├─ DeBruijnIndexMap.rs
├─ normalize/
│  ├─ mod.rs
│  ├─ rho_par.rs

In the above example, DeBruijnLevelMap.rs and DeBruijnIndexMap.rs are included by /src/context/mod.rd as part of context module; While rho_par.rs defines normalize::rho_par module.

Test Case

cargo test --all
You might also like...
Applied offensive security with Rust
Applied offensive security with Rust

Black Hat Rust - Early Access Deep dive into offensive security with the Rust programming language Buy the book now! Summary Whether in movies or main

Easy-to-use optional function arguments for Rust

OptArgs uses const generics to ensure compile-time correctness. I've taken the liberty of expanding and humanizing the macros in the reference examples.

A language server for lua written in rust

lua-analyzer lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. T

Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

Cargo - The Rust package manager

Cargo downloads your Rust project’s dependencies and compiles your project.

A copypastable guide to implementing simple derive macros in Rust.

A copypastable guide to implementing simple derive macros in Rust. The goal Let's say we have a trait with a getter trait MyTrait {

Rust ABI safe code generator

CGlue offers an easy way to ABI (application binary interface) safety. Just a few annotations and your trait is ready to go!

An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Rust ESP32 Example An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Notion Offical API client library for rust

Notion API client library for rust.

Comments
  • Rholang name's storage optimization

    Rholang name's storage optimization

    For each name in rholang, it could be stored with a number of continuations and data items.

    The scala version's RNode

    • stores all continuations of the same name in a single LMDB key, which is determined by blake2("${name}-continuation");
    • stores all data items of the same name in a single LMDB key, which is determined by blake2("${name}-data")

    https://github.com/rchain/rchain/blob/6dfa65e24599cff8561fa604e1a6c4f6d75bc9fc/rspace/src/main/scala/coop/rchain/rspace/history/HistoryRepositoryImpl.scala#L39-L41

    This is low efficient. E.g. suppose there are 1000 data items in certain name, the rholang runtime has to load all the data items to get one of them.

    Is there a reason behind this design? Can we do better?

    discussion design 
    opened by wangjia184 2
Owner
Jerry.Wang
Jerry.Wang
JIT compiler and runtime for a toy language, using Cranelift

Hello! This is a simple demo that JIT-compiles a toy language, using Cranelift. It uses the new JIT interface in development here. JIT takes care of m

Bytecode Alliance 468 Jan 7, 2023
Equilibrium substrate-based node implementation and runtime

Equilibrium & Genshiro Equilibrium is a DeFi 2.0 cross-chain money market protocol with high leverage. With Equilibrium users can: Lend: lend out asse

null 6 Apr 18, 2023
First Git on Rust is reimplementation with rust in order to learn about rust, c and git.

First Git on Rust First Git on Rust is reimplementation with rust in order to learn about rust, c and git. Reference project This project refer to the

Nobkz 1 Jan 28, 2022
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Learn-rust - An in-depth resource to learn Rust 🦀

Learning Rust ?? Hello friend! ?? Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

Lazar Nikolov 7 Jan 28, 2022
A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

Lightning Dev Kit 850 Jan 3, 2023
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

TheAwiteb 8 Dec 6, 2022
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

Conrad Ludgate 12 Dec 22, 2022
Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

André Gomes 10 Nov 17, 2022
🐀 Building a federated alternative to reddit in rust

Lemmy A link aggregator / Reddit clone for the fediverse. Join Lemmy · Documentation · Report Bug · Request Feature · Releases · Code of Conduct About

LemmyNet 7.2k Jan 3, 2023