Neurastheniacc: LLM-based C->WASM compiler you didn't need A developer released neurastheniacc, an open-source C-to-WASM compiler that uses a local Qwen large language model to handle the C-to-WAT pass, then parses the generated WAT with the `wat` crate and builds it with `wasmi`. The compiler supports only a restricted C subset — one function returning `uint32_t` with exactly two `uint32_t` parameters, no pointers, arrays, loops, recursion or function calls — and caps programs at 32 KiB, 4096 Qwen tokens and 48 nesting levels, with up to 3 retry turns by default when the model emits invalid WAT. On first run neurastheniacc downloads roughly 2.75 GB of Qwen3.5-4B-Q4_K_M weights (the `qwen-low` default) or about 16.5 GB for the 27B `qwen-high` model, running inference locally via llama-cpp-2 with no API keys required. A groundbreaking C - WASM compiler wielding the unbridled power of LLMs neurastheniacc compiles a restricted subset of C down into WASM. It follows the usual two-pass approach: first from C to readable WAT, then from WAT to WASM bytecode. However, there's a trailblazing advance that distinguishes neurastheniacc from all previous lesser? ∩¬з¬ WASM compilers: the C- WAT pass is handled purely by an LLM. With neurastheniacc , you can finally alchemize money directly into performance, without any need for pesky intermediaries like "compiler expertise" If you're unsatisfied with the defaults' results, try any of the following: - Use a larger Qwen, merely costing more GPU compute - Extend the token limits, reasoning budget, or allowed retries, merely costing more execution time - Build your own stochastically optimizing compiler: run neurastheniacc in a loop 100 times, and pick the best output - Or for the real sickoes, finetune your own C- WAT model and provide a custom GGUF Please wash your hands afterward. plz builb ๑•́ ω •̀๑ cargo build --release --locked --bin neurastheniacc First use downloads ~2.75 GB of Qwen weights, then compiles. ./target/release/neurastheniacc compile examples/mix.c -o mix.wasm Invoke the exported function in a standard Wasm runtime. wasmtime run --invoke mix mix.wasm 3 5 neurastheniacc is fully local. On first run, it downloads a Qwen GGUF and caches it. Inference is then provided during compilation by llama-cpp-2 https://crates.io/crates/llama-cpp-2 . No API keys or calls to inference providers required. During compilation, neurastheniacc validates that your C code is supported, provides your code to Qwen, and asks it nicely to translate it into valid WAT. We then take Qwen's lovingly tensor-crafted WAT just like wire mother used to make and attempt to parse in with wat https://crates.io/crates/wat and build it with wasmi https://crates.io/crates/wasmi . What happens if, Lord forbid, the model should generate invalid WAT? Never fear: a simple harness provides the current state and parser feedback back to Qwen for another attempt, with up to 3 turns allowed by default. neurastheniacc supports this astonishingly flexible program structure: One C function, returning uint32 t , with exactly two uint32 t parameters. An optional include