From 528a61749daa29f6d6909b77ac3e4ed265a97ea6 Mon Sep 17 00:00:00 2001 From: Ava Affine Date: Wed, 21 May 2025 14:58:42 -0700 Subject: [PATCH] Readme and early CI This commit prepares the code to be uploaded to gitlab. Included is a small readme and basic CI. Signed-off-by: Ava Affine --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ mycelium/src/lib.rs | 1 + readme.md | 16 ++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100755 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100755 index 0000000..a170259 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +default: + image: rustlang/rust:nightly + +stages: + - build + - test + +compile-library: + stage: build + script: + - cargo build --lib + +compile-decomposer: + stage: build + script: + - cargo build --bin decomposer + +unit-test-language-frontend: + stage: test + script: + - cargo test lexer + - cargo test parser + +unit-test-number-package: + stage: test + script: + - cargo test number + diff --git a/mycelium/src/lib.rs b/mycelium/src/lib.rs index 83820cc..e404294 100644 --- a/mycelium/src/lib.rs +++ b/mycelium/src/lib.rs @@ -19,6 +19,7 @@ #![feature(let_chains)] #![feature(iter_collect_into)] #![feature(if_let_guard)] +#![feature(core_float_math)] pub mod sexpr; pub mod lexer; diff --git a/readme.md b/readme.md index e69de29..1b7ddb4 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1,16 @@ +# Mycelium + +Mycelium aims to provide an efficient compiled to intermediate bytecode implementation +of R7RS Scheme as well as a virtual machine that will execute such bytecode. + +Two major use cases are at the forefront of mind when designing and implementing this +project: a POSIX shell interpreter as well as a compiled to bytecode language for +running on ESP32 devices. + +## Current Status +Currently the lexer and parser are implemented. On an X86 machine equipped with 64GB +RAM and an AMD Ryzen 7900 CPU this lexer and parser are capable of creating a fully +validated abstract syntax tree from approximately 11200 lines of handwritten scheme +in about 55 milliseconds on average. + +Currently the bytecode VM and its instruction set are next to implement.