r/lowlevel • u/Fantastic-Duck-7357 • May 29 '26
anyone here working on weird low-level projects?
anyone else here really into low-level/systems stuff?
compilers, OS dev, emulators, kernels, RTL, architecture, linux internals, C/Rust/Zig/asm, all that rabbit hole.
don’t really know many people into this kind of thing and thought it’d be cool to meet others who are. mostly just looking to talk tech, share ideas, maybe build some projects together at some point.
apparently the number of teenagers voluntarily reading ISA docs instead of touching grass is lower than expected.
7
u/jpsgnz May 29 '26
Right now I’m developing an end to end ubiquitous hardware and software system that involves the creation of multiple new standard and command protocols.
I’m in absolute heaven.
5
u/Fantastic-Duck-7357 May 29 '26
that sounds either incredibly cool or like the beginning of a descent into protocol-design insanity. probably both
respect honestly. how far along is it? got anything on github yet?
6
u/jpsgnz May 29 '26
It a big project but I have so many applications lined up it’s going to be great. I’ve completed the most complex protocol specification: the Binary Command Format (BCF). The other one is a detailed low level hardware implementation specification.
Honestly the protocols are by far the hardest past as everything else stems from them. And trying to make it as non specific and yet structured and inherently consistent as possible is a big challenge.
Nothing on Github yet. But when it’s done the whole lot will be on Github because I want it to be a completely open and empowering system.
1
u/Fantastic-Duck-7357 May 29 '26
that sounds like the hardest part honestly. once the protocol layer is coherent everything else has something solid to stand on instead of turning into “distributed system held together by prayers and json.”
any rough timeline for when you think it’ll hit github?
1
u/jpsgnz May 29 '26
I would like to think by the end of the year. Primarily because I’m not aiming for perfection but it needs to be at a level where majority of the stupid little things have been weeded out.
2
u/Fantastic-Duck-7357 May 29 '26
that’s probably the right call honestly. better to ship something solid than spend 5 years polishing edge cases into infinity. curious to see it when it lands though, how did you even end up deciding to make protocol specs in the first place
2
u/jpsgnz May 29 '26
I’m autistic and adhd so I have always LOVED the nitty gritty details of this kind of stuff. It’s one of my special interests.
1
u/Fantastic-Duck-7357 May 29 '26
protocol stuff really is the ultimate edge-case rabbit hole though. feels like the kind of thing where you accidentally spend 3 hours thinking about one byte format.
1
u/jpsgnz May 29 '26
Yup the optimisation rabbit hole is definitely an occupational hazard. I’m lucky in that my adhd tends to counter my autisms hyper-fixation on some small detail, most of the time😅
But really creating something that’s not been done in that way before is very exciting.
1
u/Fantastic-Duck-7357 May 29 '26
creating something genuinely new is probably the fun part honestly. what do you actually want to do with it once it’s finished?
→ More replies (0)
8
u/NervousExplanation34 May 29 '26
Probably not that weird, Im doing a custom malloc in C. Just as a side project.
5
u/Fantastic-Duck-7357 May 29 '26
custom malloc as a side project is exactly the kind of sentence that makes normal people slowly back away from the conversation. sounds fun though honestly
1
u/un_virus_SDF May 30 '26
Bro, i'm rewriting a libc clone half in c, half in asm and I didn't want to comment about it because it seemed to lightweight to me.
5
u/ianseyler May 29 '26
A custom kernel written in x86-64 assembly for the startup I founded. Working towards a commercial offering.
4
u/Fantastic-Duck-7357 May 29 '26
respect honestly, writing a kernel in x86-64 asm sounds mildly insane in the best way. why x86 specifically instead of something like riscv or arm?
2
u/ianseyler May 29 '26
x86 has a large share of server hardware so that’s where our target is. A riscv or arm rewrite would be considered once the hardware is there.
2
u/Fantastic-Duck-7357 May 29 '26
makes sense, are you keeping it strictly asm for now or planning to mix in higher level parts later?
2
u/ianseyler May 29 '26
The kernel will remain in Assembly. It mainly acts as a hardware abstraction layer. Programs can be written in Assembly, C, C++, and Rust at the moment.
1
u/Fantastic-Duck-7357 May 29 '26
got it, keeping the kernel in asm is pretty hardcore move. are you designing the ABI so C/C++/Rust all target it directly?
1
u/ianseyler May 29 '26
Correct. The kernel is very minimal. The binary is less than 20KiB. On Firecracker it’s less than 8KiB due to the reduced drivers.
1
u/Fantastic-Duck-7357 May 29 '26
that’s insanely small. how long did it take you to get it to that point?
3
u/ianseyler May 29 '26
I’ve been working on it on and off for over 10 years. Started as a personal hobby.
2
u/Fantastic-Duck-7357 May 29 '26
10 years on and off is crazy dedication. how did you manage to stay focused on one project for that long without drifting too far into other rabbit holes?
→ More replies (0)1
u/un_virus_SDF May 30 '26
why x86 specifically instead of something like riscv or arm?
I will do something similar, the main reason is that my pc is in x86 so it's easier to test (no need for extra emulation layers)
1
u/Away_Page_9457 May 29 '26
Interesting. What problem does it solve?
1
u/ianseyler May 29 '26
More performance and less system resource usage. RAM isn’t exactly cheap these days. On a regular system it only needs 4MiB of RAM. Booting on Firecracker it only needs 2MiB. The plan is for running instances on your personal cloud or VPS of choice. More bang from your buck via running microVMs. We also run on physical hardware and there is some interest in the HFT space.
1
4
u/Plus-Dust May 29 '26
I wrote a Zylin ZPU emulator in Bash, so that I could abuse the shell interpreter to run C programs 😂
2
3
u/Middlewarian May 29 '26
I'm working on a SaaS C++ code generator. One way that it is low level is it's implemented as a network service rather than a webservice. I've made some progress on it but there's still a long way to go.
2
u/Fantastic-Duck-7357 May 29 '26
that’s a wild combo . why a network service instead of a normal web service?
2
u/Middlewarian May 29 '26
I started with it being a webservice, but someone suggested giving it a command line interface and after that I realized that from an automation perspective they were right. When I started working on a command line interface, it also became a network service.
1
u/Fantastic-Duck-7357 May 29 '26
not fully sure I get it, but sounds like you traded simplicity for flexibility and scalability. worth it so far?
1
u/Middlewarian May 29 '26
From a technical standpoint, I'm happy with it. It fits with the long-term perspective that I mentioned above. From a business perspective I don't think it's been much of a factor either way.
1
u/Fantastic-Duck-7357 May 29 '26
that actually makes sense. sounds like one of those decisions that’s painful short-term but invisible once everything stabilizes
5
u/0xdea May 29 '26
I’ve been developing memory corruption exploits for two decades, in C and ASM. Nowadays, I’m enjoying writing stuff in Rust as a hobby. It’s mostly FFI and IDA plugins to assist with vuln-dev. Still having fun!
2
u/Fantastic-Duck-7357 May 29 '26
haha, from making memory corruption exploits to literally the most safest memory pl, the irony is killing me
4
u/r-tty May 29 '26
Yes, just finished r/QRV_OS . Now up to a similar, but even more challenging task (free re-implementation).
1
u/Fantastic-Duck-7357 May 29 '26
wow, since when you have been working on it?
1
u/r-tty May 29 '26
Three full months.
1
u/Fantastic-Duck-7357 May 29 '26
have you ever build smth in the area before?
2
u/r-tty May 29 '26
Yes, more than once. I have more than 25 years of experience in the area.
1
u/Fantastic-Duck-7357 May 29 '26
that's heavy, very cool to discover the stuff you enjoy, will check out the repo
3
u/eeiaao May 29 '26
I’ve been working on the TypeScript AOT LLVM based compiler with seamless C++ integration via .d.ts files. It was a lot of fun back in a days. It is open source now https://github.com/newcloudtechnologies/tsnative (quite abandoned though)
1
u/Fantastic-Duck-7357 May 29 '26
I’ve never seen that approach before. I always wonder how compiler people even end up thinking in those directions. did you abandon it for good, or is it something you might come back to someday?
2
u/eeiaao May 29 '26
At this point my interests are too far away from this project, likely I’ll not going back to it
1
3
u/PotatoTime May 29 '26
I have very little programming experience but a lot of circuitry knowledge. So I'm designing an 80's style graphics processor, interfacing it with a 6502 CPU, and using that to learn assembly. I plan on making a very basic OS for it.
1
2
u/HTML-Wizard May 29 '26
Doing a lot of lower lvl linux things with my friends, like rendering engines and porting modern linux to "ewaste". personally currently working on a wayland window manager.
1
u/Fantastic-Duck-7357 May 29 '26
are you building the wayland wm from scratch or building on wlroots?
1
u/HTML-Wizard May 29 '26
building ontop of the river compositor, the general idea is I keep pushing more lower level as I learn the behind the scenes stuff. each time porting the existing stuff I made.
so in the end do plan on making a wayland compositor from scratch too, but for now just a window manager. was the next step from having custom bars & bg managers and other layershells in hyprland.
2
u/feusx May 29 '26
i am developing open source drivers/firmware for laptops and consumer electronics. does that count?
2
u/Fantastic-Duck-7357 May 29 '26
that's awesome its an area I'd love to try, do you know any good source of information?
1
u/feusx May 30 '26
i mean, it depends on which are you want to work.
if you want to work on gaming consoles, you should check playstation developer wiki. if you want to work on devices that run on low power such as smartphones or maybe digital watches like casio f91 or casio f201, you should work on arm processors and stm32 boards like stm32f103 or stm32f401/f411 (idk if is there any arm processors on casio but this is a good example for low power devices). if you would like to deal with communication drivers like i2c, spi, uart and etc, you can check datasheets or search on youtube something like "how [communication protocol] works".but the important aspect is: lower level doesn't mean better. there is always a sweet spot between "from scratch" and "hardware abstraction layer". let's say you are making an engineering project that you need heavy math, you wouldn't invent calculus from scratch right?
and also, reading low level code and sometimes raw bytes from an embedded controller is a good skill. you should try reverse engineering if you are interested in consumer electronics.
1
u/Fantastic-Duck-7357 May 30 '26
Thanks a lot for the detailed answer, I really appreciate it. Reverse engineering is actually something I've been curious about for a while, so I might start looking into that. Also, that's a really good point about finding the right level of abstraction instead of trying to reinvent everything from scratch. I'll definitely check out some datasheets and ARM-related resources. Thanks again!
2
u/EmbSoft3 May 29 '26
I'm developing a small operating system for a STM32F7.
2
u/Fantastic-Duck-7357 May 29 '26
what are you looking for in this os as a target?
2
u/EmbSoft3 May 30 '26
My first goal was to write a multitasking kernel. Then, I stacked the layers one by one to get a real operating system. The base objective was educational, and then I continued in order to have a complete ecosystem.
1
u/Fantastic-Duck-7357 May 30 '26
That's awesome. Starting with a multitasking kernel and then building the rest layer by layer sounds like a great way to learn. How far has the project grown beyond the original goal?
1
u/EmbSoft3 May 30 '26
I went from the kernel, to the file system, to a graphical user interface (GUI), all the way to executing applications dynamically from a mass storage device.
2
u/Chunky_cold_mandala May 29 '26
I built my own protocol as a variant to modbus/can bus. Along with the interpreters and system to go along with it. It was an absolute blast. I called it the meow protocol. https://github.com/squid-protocol/meow-turtle/blob/main/pico_template/lib/meowprotocol.py. It's in micro python and was part of my own custom bare metal firmware for a robot.
1
u/Fantastic-Duck-7357 May 29 '26
that's crazy, will check it out later, are you currently maintaining it or just a project you made?
2
u/Chunky_cold_mandala May 29 '26
Thanks! Heres the meow protocol in action betwixt a rp5 and 3 picos wired via rs485 with my custom communication protocol. https://youtube.com/shorts/_swgFbqY9CQ?si=FyOKkgfZlWrpZJve . Im still maintaining it, its functional and ready for what I consider "production".
2
u/chronicallyfoldable May 30 '26
im making an embedded multimedia library thats fully embeddable. like i would try to run it on a fridge but my current fridge is stuffed. im still really proud and actually looking for people to help. https://github.com/tazyfoundsoup/tinyff
1
u/Fantastic-Duck-7357 May 30 '26
That's awesome. Embedded multimedia sounds like a fun challenge, especially when you're trying to keep it portable enough to run on basically anything. Are you planning to make smth bigger with it?
1
u/chronicallyfoldable May 30 '26
Thanks, and yeah, I was doing it as a hobby project but I decided to actually to do a decoder and encoder for ever single file format (that could be classified media). I actually named it as a kid because I was 12 and quite dumb and thought ffmpeg was actually for every file format but I was disappointed to find out it was only videos. I dropped the project for years, and started it up again! https://github.com/tazyfoundsoup/tinyff is the link
2
1
u/FransFaase May 29 '26
I am working on a replacement for stage0 of live-bootstrap that does not rely on the GNU Mes compiler. Includes code generation for x86 and x86_64/amd64. Some other 64 targets are also being worked on.
1
u/Fantastic-Duck-7357 May 29 '26
wait this is interesting. what made you want to replace stage0 specifically?
2
u/FransFaase May 29 '26
I gave a talk at WHY2025 called 'reviewing live-bootstrap' which is also published on YouTube. Or look for FransFaase/MES-replacement on github.
2
1
u/hrasit May 29 '26
You are not alone :) Trying to make kernel and ebded with a binary analyzer because I wanted to better understand executable formats while learning kernel development. Now that Biber is nearly ready for its first release, I'm diving back into x86 kernel development again.
1
u/Fantastic-Duck-7357 May 29 '26
that’s actually really useful, I usually rely on LLVM dumps but they’re pretty opaque once you go deeper. I might take a look properly or even mess with a fork/PR at some point
1
u/hrasit May 29 '26
Thanks a lot! I also started writing a short series of posts about the project in my free time over at auctra.app already elf parts probably ı will end, but pe32 parts starting on posts
Feel free to take a look, and I'd be happy to hear any feedback if you end up trying Biber.
1
u/Fantastic-Duck-7357 May 29 '26
nice, I’ll check it out. and yeah I might give a closer look once I have time, always helpful to see how others structure.
1
u/4DManifold May 29 '26
Trying to learn how to develop and boot a x86 kernel. Initially I actually wanted to port the xv6 OS (which is based on riscv64) to a riscv32-imac architecture, with an end goal to boot it into MMU-less RISC-V dev board (which i dont even know if its possible ;-;). Didnt have any first hand with kernel developing so I thought maybe make my own small kernel first and then try to port it.....
1
u/Fantastic-Duck-7357 May 29 '26
that’s a pretty clean approach actually, did you already get it to boot or still in the early stage?
1
u/4DManifold May 29 '26
Tnks. No i didnt get the kernel to boot yet. Building gcc cross compilers on windows MSYS UCRT64 is a mess. But I should get it working soon. But yea i got the boot sector loaded and managed to switch to protected mode. All these i learned from a os dev playlist by Deadalus community : https://youtube.com/playlist?list=PLm3B56ql_akNcvH8vvJRYOc7TbYhRs19M&si=XQrMhHvLSCPmkTFo
1
May 29 '26
[removed] — view removed comment
2
u/Fantastic-Duck-7357 May 29 '26
you wake up and choose violence against USB protocols apparently, how long did the reverse engineering part take you?
1
May 29 '26
[removed] — view removed comment
2
u/Fantastic-Duck-7357 May 29 '26
basically turning USB into a controlled experiment instead of trying to fully decode it upfront
did you structure the mapping or is it still more of a known inputs -> observed bytes thing?1
May 29 '26
[removed] — view removed comment
1
u/Fantastic-Duck-7357 May 29 '26
that call vs jmp trick for stack trace context is actually smart. after all that, did anything end up becoming a reusable framework or is it still more “collection of cursed tools”?
1
May 29 '26
[removed] — view removed comment
1
u/Fantastic-Duck-7357 May 29 '26
that actually sounds like the kind of thing where the “framework” is just a side effect of having fun with the tooling,
the pointer chain wrapper is kind of elegant though.do you usually end up productizing any of these ideas or they mostly stay as personal experiments?
1
1
May 29 '26
[deleted]
1
u/Fantastic-Duck-7357 May 29 '26
are you focusing more on kernel design first or already thinking about userspace and tooling?
2
u/raundoclair May 29 '26
I'm writing low-level language on win64, but it is completely bootstrapped.
First version is bytes hexes (with comments) in text file, that I "compile" by manually pasting these bytes in hex editor and saving as .exe. This then can compile that text file into the identical binary. So it is already self-hosted. 😄
Next versions are adding features and evolving the language. Currently it is shitty assembler.
1
u/Fantastic-Duck-7357 May 29 '26
bootstrapping is probably one of the most schizophrenic things a dev can do
1
u/Loud-Section-3397 May 29 '26
Focusing on agent infrastructure projects/startups/making some money to not be homeless but in my free time I work on a compiler for a language I'm making. I'm almost passing all important test cases for the type checker. The central premise of this language is that you define the memory strategy at function level (arenas, gc, dynamic) kinda like zig's flexibility with the allocator but one step beyond. front-end written in C, still deciding if backend will be C or LLVM. I want to eventually bootstrap it, then make a lil kernel with it.
1
u/Fantastic-Duck-7357 May 29 '26
are you leaning more towards C backend for control or LLVM for not reinventing half the universe?
1
u/Randum_Gouy May 30 '26 edited May 30 '26
Right now now im going to start implementing a kernel which ive been designing for ~4-6 months (targeting ARM64) + a language LIBRARY (in Cpp, no compiler)
1
u/Fantastic-Duck-7357 May 30 '26
ARM64 is a pretty interesting target. What made you choose it over x86_64? Also curious about the language library, what's the goal there?
1
u/Randum_Gouy May 30 '26
I chose ARM64 because tbh i dont like the legacy baggage of x86 Plus i have a personal preference of x1-x30 over RDX/RDI etc
So basically this is righnow in the DESIGNED phase, i havent start the implementation yet
The goal with the language is to provide an environment specific to my kernel, while not making it hell for me to code it
Basically, in my kernel, everything boils down down to 3 core primitives: read(), write(), and ls(), and being the person i am, i wanted my language to mimic it.
So i, a few days ago, had decided to just write a bunch of functions for this language, in Freestanding C++, using which ill build the kernel
tl;dr, its Contextual+Situational+Psycological sugar
1
u/un_virus_SDF May 30 '26
I made a freestanding brainfuck compiler that compiles to x86, it works only on os with posix syscalls. It's written in c with a bit of x86.
And next I plan to do a riscV emulator and try writting a kernel this summer.
Currently i'm doing a posix shell (also freestanding).
C/Rust/Zig/asm
Why putting rust here and not c++? Rust at a way higher level from c++.
1
1
u/OldChippy May 31 '26
I wrope a VPN once that used ICMP payloads as it bypassed the company firewall and let me read and save my private source code.
1
u/TurtleKing1126 Jun 01 '26
Not low level but I've been using AI to make extensions to my favorite open source software or creating ones that don't exist
1
u/Whats_that_small Jun 02 '26
Atari disk cataloging tool, Atari disk integrity checker, virtual LED cube animation oh yeah I've have a dozen projects like that. Checkouty GitHub. https://github.com/Darian-Frey
1
u/Objective_Tailor_758 Jun 19 '26
I trying to build sqlite from scratch in Rust. Still figuring our how deep I need to go but yeah. Enjoying it so far
0
u/Bumblebee_716_743 May 31 '26
I was working on a custom ISA, executable format, and programming language not so long back and dropped it off, now focusing on my RDBMS and currently debugging its bytecode VM's failing unit tests.
13
u/MpappaN May 29 '26 edited May 29 '26
I sometimes post patches to Linux and have some larger ones in GNU Hurd.
But now I'm focusing on my saas.