Skip to content

imaginator/SimplicityHL-as-rust

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Interface between SimplicityHL as Rust

GitHub crates.io docs.rs

The SimplicityHL language feels very similar to Rust. This crate provides tools to work with SimplicityHL as literal Rust.

Documentation βœ…

We define a Rust type for each SimplicityHL type. We define a Rust function for each SimplicityHL jet. rustdoc can be used to generate SimplicityHL documentation.

Source code conversion 🚧

SimplicityHL code is almost Rust code. For the most part, SimplicityHL lacks advanced features such as generics, so the corresponding syntax is missing.

Because there are only few and predictable differences, we can convert SimplicityHL code to Rust code with a simple static algorithm. This tool hasn't been written yet, but it would enable us to compile SimplicityHL code with the Rust compiler.

This means there would be two paths for a SimplicityHL program:

  1. SimplicityHL β†’ Simplicity β†’ Bit Machine
  2. SimplicityHL β†’ Rust β†’ any CPU

Using this library as prelude, the SimplicityHL program in (1) that runs on the Bit Machine should behave exactly as the SimplicityHL program in (2) that runs on any CPU.

About

Tools for working with Simfony as literal Rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%