I've been working on a prototype for an MLIR-backed Vulkan Hardware Abstraction Layer (HAL) in response to https://github.com/modular/modular/issues/7413 and wanted to share it here for feedback: here is my attempt at it
Similarly, imagine a graphics application where only one object changes. The runtime could identify which data actually needs updating instead of recalculating everything unnecessarily.
My goal isn't simply to create another garbage collector or claim that this will automatically outperform existing languages.
I'm exploring whether a programming language can make resource management more intelligent while keeping it automatic for the programmer.
I'd like to hear your thoughts:
Would combining adaptive memory management, predictive execution, and incremental processing make sense as part of a language runtime?
Or would you prefer these responsibilities to remain separate systems?
I'm particularly interested in the architectural trade-offs and potential problems with this approach.
I’ve been working on Keen, a language that gives C a modern, Rust-inspired syntax and Cargo-like tooling without changing C’s underlying semantics.
The core idea
Keen changes C’s syntax only. There is no borrow checker, no type checker, and no safety enforcement. All of C’s rules (integer promotion, ABI, linkage, UB) remain completely intact. Keen transpiles .kn files to C, hands them off to gcc or clang for semantic checking and compilation, and maps compiler diagnostics directly back to your .kn source lines via #line directives.
It's aimed at C developers who want modern ergonomics (modules, match, for i in 0..n, no header boilerplate, built-in testing/formatting) without giving up C's simplicity, or C devs looking to get comfortable with Rust's syntax before tackling the borrow checker.
What a quick example looks like
use <stdio.h>;
struct Point { x: f32, y: f32 }
impl Point {
pub fn len2(p: *const Point) -> f32 { p->x * p->x + p->y * p->y }
}
pub fn main() -> i32 {
let p = Point { x: 3.0, y: 4.0 };
printf("%.1f\n", Point::len2(&p) as f64);
return 0;
}
What’s included out of the box
Zero-dependency toolchain (whet + keen): Includes keen new, incremental keen build, keen run, keen fmt (comment-preserving, idempotent), and keen test (runs #[test] functions in isolated processes).
Seamless C interop: Use #include via use <stdio.h>;, drop down to raw C anytime with c!("..."), link existing .c/.o/.a files, or use keen emit --split to generate clean .h/.c files for existing C projects.
No forward-declaration headaches: Types and functions can be declared in any order; pub handles external linkage while everything else defaults to static.
(19M, Nepal(south asia)) I am currently in the third year of my ug and am fascinated by this field and preferably want to continue it till masters or pHd if i can get one . unfortunately i come from pretty strapped background and would need to sustain myself , but dont really have enough judgement to discern what implications of ai would be here, and if i should really continue. I am also find doing lc pretty enjoyable , but i dont think that skill would be any valuable here.
oksolc 0.2.5 now supports solc 0.8.37, 0.8.38 and 0.8.39, as well as solc 0.8.36.
Before oksolc 0.2.5, the compiler targeted only solc 0.8.36. A project pinned to a later release had no way to get the same bytecode from oksolc that its own solc produces.
What oksolc is
oksolc is a new Solidity compiler written in Zig. It accepts the same Standard JSON input as solc, and on the 12 projects we measured it built 3.3 to 6.0 times faster than solc's via-IR pipeline.
We wrote it for our own use while developing Chainwall. The goal was shorter build times during contract development.
oksolc provides a command-line tool, a C library with the same interface as libsolc, and a Zig module. The supported compilation path is optimized via-IR through Standard JSON.
What changed in oksolc 0.2.5
The default is now solc 0.8.39, and --solc-version selects any of the three earlier releases. The selected release controls pragma checks, code generation, diagnostics and metadata.
block.slotnum and Yul slotnum() compile on the Amsterdam EVM version from the solc 0.8.37 target onwards.
solc fixed four via-IR bugs between solc 0.8.37 and solc 0.8.39: SOL-2026-4, SOL-2026-6, SOL-2026-7 and SOL-2026-8 in the Solidity compiler bug list. oksolc applies the same fixes on every target.
Checked and unchecked arithmetic get separate constant helpers, and Yul returndatacopy calls that can revert keep their bounds checks.
I compiled the 14 projects bundled with the oksolc benchmark with both compilers, on each of the three new solc releases. The complete Standard JSON output was the same every time. The README reports the same result for 17 workloads.
The solc 0.8.36 target keeps the security fixes and the constant-helper fix, so its bytecode can differ from solc 0.8.36. The README documents each difference.
Build times on 12 open-source projects
For each project we sent the same Standard JSON build request to solc 0.8.39 and to oksolc 0.2.5 targeting solc 0.8.39. oksolc ran on 1 job and on 4 jobs. The benchmark records a result only when both compilers produce the same bytecode. Both compilers ran the optimized via-IR pipeline, so these times compare oksolc with solc via-IR, not with solc's default pipeline.
Project
solc 0.8.39
oksolc, 1 job
oksolc, 4 jobs
Sablier v2 1.2.0
523.1 s
208.4 s
145.9 s
EigenLayer 0.3.0
175.1 s
77.9 s
40.0 s
Solady 0.1.26
58.1 s
29.2 s
17.5 s
Uniswap v4 (2024-06-06)
39.3 s
18.2 s
7.4 s
Pendle v2 (2026-09-16)
26.0 s
12.1 s
6.8 s
OpenZeppelin 4.8.0
20.9 s
9.7 s
3.7 s
OpenZeppelin 4.7.0
18.9 s
8.8 s
3.2 s
Liquity (2024-10-30)
14.7 s
7.0 s
3.4 s
OpenZeppelin 4.9.0
13.6 s
6.4 s
2.7 s
OpenZeppelin 5.0.2
10.8 s
5.1 s
2.0 s
OpenZeppelin 5.6.1
10.3 s
4.9 s
1.7 s
Uniswap v4 (2022-06-16)
6.6 s
3.1 s
1.3 s
With a single job, oksolc built every project 2.0 to 2.5 times faster than solc. With 4 jobs, it was 3.3 to 6.0 times faster. Building all twelve took 15 minutes 17 seconds with solc and 3 minutes 56 seconds with oksolc on 4 jobs.
Incremental builds are faster still. In a serve or watch session, oksolc keeps the compiler in memory and reuses work between edits.
I measured on my Apple Silicon MacBook Air with 16 GB of memory. The solc times and the oksolc 4-job times are the median of 3 runs after 1 warmup run. The 1-job times are single runs. On 4 jobs, oksolc used more memory than solc on most projects, for example a peak of 5.3 GiB against 2.4 GiB on Solady. Sablier v2 peaked at about 8 GiB with either compiler in these runs, and its three runs varied more than any other project's.
Sablier v2, the largest project in the set, went from 8 minutes 43 seconds with solc to 2 minutes 26 seconds with oksolc on 4 jobs, with the same bytecode.
How to use it
You need Zig 0.17.1. Build oksolc from the release tag:
git clone https://github.com/okcontract/oksolc
cd oksolc
git checkout v0.2.5
zig build -Doptimize=ReleaseFast
./zig-out/bin/oksolc version
For a Foundry project, point foundry.toml at the oksolc executable and enable optimized via-IR:
oksolc can serve a local page for browsing a compiled project. It lists the project's source files next to the file you select, with an outline of everything that file declares.
For each contract the page also shows the ABI and the creation and runtime bytecode with their sizes. You can search the project, and two side panels list diagnostics and references.
open in the oksolc browser
The browser is left out of a default build. Build with -Dbrowser=true, which needs Bun 1.4.5 and TypeScript 7.0.2, then run it from your project:
oksolc serve --browse
Open http://127.0.0.1:8080. serve watches the Solidity files in src/ and recompiles when they change. To browse a single Standard JSON request instead, run oksolc browse --request input.json.
Including the browser adds about 0.3 MB to the binary.
What should it show next? Open an issue and tell us.
Try it on your project
Build one of your own projects with oksolc and compare the result with solc. If the two differ, open an issue on github.com/okcontract/oksolc and include the output of oksolc version --json.
If oksolc is useful to you, star the repository. For new releases, follow us on X at u/okcontract.
In this post I just want to present the API for my own IR, as an example of what one might look like at a vastly smaller scale (compared to LLVM). I am not selling it, and I'm not giving any links (none exist anyway). It's just something different.
Only the high-level functions for managing an entire program are listed. 'PCL' is the IL name.
Possibly, it might be simpler than QBE, however QBE deals with only a small part of the pipeline (it turns SSA text into ASM text).
proc pcl_start (int nunits = 0) # (Syntax is my systems language.)
proc pcl_end
func pcl_runpcl :int
proc pcl_genmcl
proc pcl_genss (int obj = 0)
proc pcl_exec
proc pcl_writeexe (ichar filename) # ('ichar' is like char* in C)
proc pcl_writedll (ichar filename)
proc pcl_writeobj (ichar filename)
proc pcl_writemx (ichar filename)
func pcl_writeasm (ichar filename = nil, int atype = 'AA')ichar
func pcl_writepcl (ichar filename = nil)ichar
func pcl_writepst (ichar filename = nil)ichar
func pcl_writess (ichar filename = nil, int obj = 0)ichar
proc pcl_cmdskip (int cmdskip, psymbol dcmdskip = nil)
pcl_start Start a new IL program and ST. The optional 'nunits' argument gives an estimate of the program size.
At this point, there is set of 40 lower-level functions, starting with 'pc_' and 'gen_', used to build IL code, data and symbols. This is done for an entire program as this is designed for whole-program compilation.
This library uses a single global context so no context handles need to be returned or passed.
pcl_end Write an end-of-program marker. This IL program is now complete.
pcl_runpcl Run the program via interpretation of the IL. This is not fast or efficient, but it is useful for debugging, experiments, profiling or for fun. The return value is the program exit code.
pcl_genmcl Turn the IL into a native code representation. Mainly this is for x64/Windows. Experimental backends have been done for 8-bit Z80, with a brief foray into ARM64/SYS V.
pcl_genss Turn the native code representation into binary machine code.
pcl_exec Fix up the binary machine code and run it in memory.
pcl_writeexe pcl_writedll Write Windows EXE or DLL files.
pcl_writeobj Write an object file in PE+ format (this is the only time a linker is needed)
pcl_writemx Write the program in my private executable binary format
pcl_writeasm Dump as ASM source to a file or string. Supports four formats: AA (mine), NASM, GAS, and MASM, although usually only one is configured in a particular build.
pcl_writepcl Dump as IL source code to file or string. This is for debugging mainly but the result can represent an entire program (see below).
pcl_writepst pcl_writess Write the IL symbol table or dump the generated binary to a file or string.
pcl_cmdskip This is to do with moving the command line parameters when invocation is complex (see example below).
The call-pattern to generate an EXE file say might be:
pcl_start()
genpcl() ...
pcl_end()
pcl_writeexe(outfile) # calls pcl_genmcl/pcl_genss if needed
The above library is normally built-in to a compiler. The library can also be built into a standalone DLL, a dynamically linked library. I might do that if I wanted to use it from my scripting language, say.
What I don't have in this API is a way to read textual IL from a file. That is done in a standalone application that contains the necessary front-end.
Some stats for this library that includes all the above:
I wanted to see if TypeScript could get a rustc-style checker: query-based, incremental, and designed to be embedded. It's a from-scratch semantic engine, not a port. I skipped writing a parser and built on Oxc, so the work goes into the hard part: types, generics, flow narrowing, and cross-file incremental checks.
- Matches tsc exactly on 56.6% of the TypeScript v6.0.3 test corpus (8,072 of 14,274 files). The corpus is the whole release: single-file, multi-file and JSX cases.
- Checks classes, generics with inference, `keyof`, conditional types with `infer`, overloads, async and narrowing.
- Re-checks only what an edit reaches, through a Salsa-backed project engine.
- Ships an LSP (diagnostics, hover, completion, go-to-definition, references, rename), VS Code and Zed extensions, and a WASM build.
How it's built
- Queries: every semantic question is memoized, so an edit re-runs only the queries it touches.
- Cycles: import cycles are resolved as strongly connected components.
- Types: they're interned IDs in one arena, so type equality is an integer compare.
- Rules: they're table rows, so adding a rule means adding one line.
What it doesn't do yet
It's experimental. It misses some errors that tsc reports and, less often, reports one that tsc doesn't. I publish the gap with every change, measured against the corpus, so you can see exactly where it stands.
A note on speed and memory
I'm deliberately not publishing speed or memory numbers. tsc and the other full checkers check every file completely. tsox doesn't yet: it still skips, or only partly checks, a large share of what tsc checks (the 43.4% of the corpus that doesn't match exactly), so its times and memory use would be for less work. A comparison like that isn't correct, however good it looks. I'll publish numbers once tsox checks the same things they do.
How you can help
- Conformance triage: pick a diagnostic code, read what tsc does, and write the smallest fix that turns a batch of files into matches.
- Fixtures: a failing case in `tests/fixtures/` is how most changes start.
- Real code: try it on your own TypeScript and open an issue where it disagrees with tsc.
Hi there, im working on a apk to source decompiler tool chain with full game compiled and run smoothly on almost any IL2CPP Unity game apk/ipa. Actually i have done for almost 40 games top of market focus on hybrid casual even the liveops part. Some game with pairIP anti Frida and BeeByte Obf still can break. But im not sure about public the kit since i dont know how it will impact. The de-compilation process took 1 day for everage size game to 5 days on massive game with million lines of code decompiled with LLM support.
A recent news where NEAR AI reported that an attacker exploited a RCE vulnerability in SGLang exposing account details etc.
At this point it seems like we need a better way to program inference systems. As per Claude's research and SGLang's published RCEs this year share a pattern: Python features that run code by design, exposed to the network.
Pickle over sockets. A ZMQ broker calls pickle.loads() on unauthenticated data, and one scheduler socket binds to 0.0.0.0 by default.
Malicious model files. A GGUF chat_template can carry a Jinja2 template-injection payload because templates weren't sandboxed, and a torch.load(weights_only=False) fallback unpickles .bin files.
Weak admin endpoints. LoRA loading allowed unauthenticated RCE through an incomplete pickle denylist, and /server_info returned API keys.
This is where *capability types* can help programmers and tools and AI reason about the attack surfaces. Vx is in early stages so adding capability types is not too difficult at this point but I'd like to learn from someone who has done it before.
For a long time, compilers felt like this intimidating black box that only seasoned wizards or PhDs could understand. Every time I looked at LLVM or GCC source code, I got completely lost.
A few weeks ago, I decided to stop being intimidated and just try building a tiny C99 compiler from the ground up to understand what actually happens between source code and machine instructions. I'm calling it mibicc.
I'm taking an incremental approach (inspired by Rui Ueyama's philosophy with chibicc), where every commit is an isolated, test-driven step.
I just hit Step 4, and it was the first real "aha!" moment for me:
Built a simple recursive descent parser that constructs an Abstract Syntax Tree (AST).
Handled operator precedence (*, / over +, -) and arbitrary nested parentheses.
Implemented a simple stack-machine code generator that emits AT&T x86-64 assembly using imul, cqo, and idiv.
Seeing an expression like 2 * (3 + (4 * 2) + 2) parse into a tree, emit assembly, and return the correct exit code on Linux felt incredible.
The code is still small and readable (~250 lines of C), and every step has CI tests on GitHub Actions. My goal is to eventually work my way through control flow, functions, and pointers.
I'd genuinely love any feedback, critique on how I'm structuring the AST nodes, or advice from people who've built compilers before on traps to avoid as I move toward local variables and statements:
Edit: Decided to add Windows support alongside Linux from the start (--target=windows and --target=linux). I'm on Windows so it felt silly to only generate Linux assembly and not run it locally. Also feels nice making it my own thing rather than just copying chibicc 1:1.
A while back, I started building FoxVC—a lightweight, zero-dependency scripting language and bytecode virtual machine designed around 25 deterministic keywords (act, emit, pick, alt, spin, pulse, etc.).
Like a lot of hobby language projects, it originally started with a classic architecture: a Python frontend (lexer, AST parser, bytecode compiler) that called into a fast C VM (foxvm.so) via ctypes. It was fun, it worked, but eventually, I hit what I call the "3-language duplication trap": 1. You write a feature in Python. 2. You have to sync it with your C VM. 3. Then you want a WebAssembly browser playground, so you end up maintaining a third JavaScript parser that slowly drifts out of sync. 4. Worst of all: cold-start latency sucked. Spawning Python just to parse a 20-line .fox script took ~200ms before the C VM even touched the first bytecode opcode.
Over the last few weeks, I pushed two massive updates—v2.0.0 (Engine 0.7.0) and today’s v0.7.1 “Titan” update—to completely overhaul the engine.
The submission site for CC 2027 is now open, and the deadline is under two weeks away.
What: ACM SIGPLAN 2027 International Conference on Compiler Construction (CC 2027)
When/where: March 20-21, 2027, Salt Lake City, Utah, co-located with CGO, HPCA and PPoPP
CC is interested in work on processing programs in the most general sense: analyzing, transforming or executing input that describes how a system operates. Topics include, but are not limited to:
Compilation and interpretation techniques: program representation, analysis and transformation; code generation, optimization and synthesis; and their verification
Design and implementation of novel language constructs, programming models and DSLs
Compilers for modern, emerging or non-conventional domains: AI and deep learning frameworks, EDA toolchains, high-level synthesis, database engines, quantum computing, DNA computing
Compilers for modern, emerging or non-conventional hardware: specialized AI chips and accelerators, quantum hardware
Techniques, from programming languages to micro-architectural support, for secure, parallel, distributed, embedded or mobile environments
Run-time techniques: memory management, virtual machines, dynamic and JIT compilation
In case of GPUs, it is common to have operands in different memory, sometimes there are specialized instructions but the programming language may not provide the right tool to capture the optimization.
C = A @ B for example:
Most languages assume A, B and C are in the same memory. That keeps things simple, but it could have performance implications.
So if A is in HBM and B is in SMEM, where should C go? Typically kernel programmers use assembler, Ptx etc to have tighter control on the codegen.
But if we allow memory spaces (HBM, SMEM, registers) in a programming language's type system (like Vx), one can write better code without using lower level primitives.
Is it the right amount of control a language should provide or defer it to assembler/intrinsic. I have early design draft for Vx if anyone can give feedback. Link in comment
I have been building a C compiler in C, about 14,000 lines with no dependencies. Two decisions in it are worth other people's opinions, and both are the kind you only get to make once.
codegen prints a textual IR to stdout. The assembly backend then parses that same text back to build its own representation.
Why: the IR stays diffable, golden tests are just text files, and codegen output can be read without a debugger. Every stage of the pipeline is a subcommand, and this is the decision that made that possible. You can run codegen and look at the result.
What it costs: the backend re-derives types from text instead of being handed a typed structure. It guesses from the operation and the operands, and three of those guesses were wrong before I found them. The IR carries less information than it should, and that is a real defect I have chosen to live with.
The backend does no register allocation.
Every value lives in a stack slot. Load, operate, store, for everything.
Why: the output is correct before it is fast, and the backend stays small enough to read. It is about 3,400 lines.
What it costs: the generated code is slow, and the backend cannot use the register count as a signal about anything. I think this is the right trade for a compiler meant to be read, but I would like to be argued out of it.
What it covers
Integers, doubles, pointers, control flow, function calls. The assembly backend rejects structs, local arrays, single-precision floats, sizeof, and more than six integer arguments, each with a located diagnostic. The front end is wider than the backend.
What I am asking
If you have built a compiler with a text IR, did you keep it or move to an in-memory structure, and what made you move?
Is there a version of "no register allocation" that stays readable but produces code someone would actually ship? A linear scan is maybe 200 lines, and I keep deciding not to.
The preprocessor rewrites the program as text rather than as tokens, so source locations are approximate inside macros. Is that fixable without rewriting the stage?
Pyrefly (a Python type checker and language server) has just release version 1.5. It brings large performance optimizations and new features like Tensor Types six months after the first stable release.
Highlights (Taken from release):
100% typing spec conformance. Pyrefly now passes all 146 test files in the typing conformance suite. Some of these fixes change how names in annotations resolve; see Behavior Changes.
Faster checks. v1.5.0 checks 40% faster than v1.4.1 and uses 9% less memory across the 71 benchmarks in Astral's ty_benchmark and the python-type-checking benchmark suites. (Tested on an M5 Max MacBook Pro with 18 threads.)
A newhintseverity. Diagnostics that were previously IDE-only are now regular error kinds at a new hint severity: unused-import, unused-parameter, unused-variable, unreachable, and inactive-code (formerly unreachable-code). By default, they appear in your editor and are hidden from pyrefly check output, but you can configure them in pyrefly.toml, silence them with suppression comments, or promote them to errors like any other error kind.
I’ve been working with AI on Oster, an experimental programming language and compiler written in Rust that compiles down to portable C11.
Why Oster?
The main goal is to combine modern static safety guarantees (ownership, non-lexical lifetimes / borrow checking, escape analysis, exhaustive pattern matching) with the ubiquity and zero-runtime portability of standard C11 — making it easy to target anything with a C compiler and integrate seamlessly with existing C codebases.
I've released the first public beta of RCA, a statically typed language with built-in tensors and automatic differentiation. The compiler is written in Rust and was developed on a phone in Termux.Features: type inference, generic functions, enums + match, modules, a bytecode VM, native codegen via Cranelift, CPU tensors, reverse-mode autodiff, and tooling (fmt, lint, LSP, REPL, debugger, package manager).
Not production ready. Known gaps: no references/borrowing, no generic structs, no GPU. Feedback on design and on the Cranelift backend is welcome.
for those that compose and craft compilers, do you find the results better and more satisfying for you if the compiler you work on is permissive/optimistic or strict/pessimistic?
permissive/optimistic here means that the starting point is the compiler assumes the line of code that it is parsing/evaluating is probably ok but needs to pass some checks before translating to the target backend? (this is “the compiler is your friend” approach)
strict/pessimistic here means that the starting point is the compiler assumes the line of code that it is parsing/evaluating has something wrong and its job is to discover that wrong thing, and it is disappointed when the line passes all checks before translating to the target backend? (this is “the compiler is the teacher we’ve all had at one point in our life where they assume you’re going to do something bad as soon as they’re not looking” - and they’re not wrong)
obviously there has to be some balance here, but i’m curious, what has been your experience with these two approaches?
I tried searching but maybe what i want doesnt exist. I want simple IR that has vectors(something like C++ vectors), struct fields and functions. Ik that too high level for ir but transpilation to C++ is slow to compile into final binary file. If anyone from you know if this kind of IR exists, i would appreciate to know about it. I use C++ for my compiler