I made a parser for a CSS dialect (with far less features) to style my C++ game UI (which is made with Clay).
Why? Well, plenty of reasons why not, so I'll just say:
I made a parser for a CSS dialect (with far less features) to style my C++ game UI (which is made with Clay).
Why? Well, plenty of reasons why not, so I'll just say:
| [package] | |
| name = "hurl-demo-stresstest-backend" | |
| version = "0.1.0" | |
| edition = "2024" | |
| [dependencies] | |
| anyhow = "1" | |
| tokio = { version = "1", features = ["full"] } | |
| hyper = { version = "1", features = ["full"] } | |
| hyper-util = { version = "0.1", features = ["full"] } |
| { | |
| "openapi": "3.0.3", | |
| "info": { | |
| "title": "NetBox REST API", | |
| "version": "3.6.9 (3.6)", | |
| "license": { | |
| "name": "Apache v2 License" | |
| } | |
| }, | |
| "paths": { |
| #pragma once | |
| #include <algorithm> | |
| #include <array> | |
| #include <random> | |
| #include <glm/vec3.hpp> | |
| #include <hex/coords.hpp> |
| #pragma once | |
| #include <type_traits> | |
| #include <concepts> | |
| #include <functional> | |
| #include <stdexcept> | |
| #include <optional> | |
| #include <vector> | |
| #include <tuple> |
| let task_args: Vec<Value> = vec![]; | |
| let mut block = func.call(&mut context, task_args); | |
| let ignored = Value::Boolean(bool::default()); | |
| let mut state = block.resume_with(ignored); | |
| loop { | |
| match &state { | |
| GeneratorState::Yielded(FunctionInterruption::Effect { name, args }) => { | |
| // try to handle side effect |
| tokio::spawn(async move { | |
| let process_handle = tokio::spawn(async move { | |
| // run process's function | |
| }); | |
| let res = process_handle.await; | |
| // notify the node of the process termination | |
| }); |
The Letlang compiler translates the Letlang code to Rust code.
The structure is as follow:
11_std_io.let)| #[allow(unused_variables)] | |
| #[allow(unused_imports)] | |
| #[allow(dead_code)] | |
| mod symbol_a { | |
| use llcore_runtime::*; | |
| pub fn const_a(context: Arc<Mutex<Context>>) -> Value { | |
| Value::Primitive(PrimitiveValue::Number(42.0)) | |
| } |
| # Tooling configuration files | |
| FROM scratch AS context | |
| ADD package.json \ | |
| yarn.lock \ | |
| .eslintrc.js \ | |
| .eslintignore \ | |
| /workspace/ | |
| # Source code |