#conversion #literals #language #simfony

simfony-as-rust

Tools for working with Simfony as literal Rust

7 releases

0.1.7 Oct 12, 2024
0.1.6 Oct 2, 2024
0.1.5 Sep 2, 2024
0.1.4 Aug 20, 2024
0.1.3 Jul 28, 2024

#466 in Cryptography

Download history 119/week @ 2024-08-16 13/week @ 2024-08-23 143/week @ 2024-08-30 15/week @ 2024-09-06 13/week @ 2024-09-13 1/week @ 2024-09-20 156/week @ 2024-09-27 34/week @ 2024-10-04 148/week @ 2024-10-11 9/week @ 2024-10-18

727 downloads per month

CC0 license

115KB
1.5K SLoC

Interface between Simfony as Rust

GitHub crates.io docs.rs

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

Documentation ✅

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

Source code conversion 🚧

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

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

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

  1. Simfony → Simplicity → Bit Machine
  2. Simfony → Rust → any CPU

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

Dependencies

~45KB