I built Soul, a tiny compiled language that generates ~22KB binaries

4
calendar_todayschedule2 min read
— Originally published at dev.to

I've been working on a small compiled language called Soul.

It didn't start from benchmarking existing tools. It started from a simpler question:
how small and fast can a compiled language be if it's designed to do just a few things well?

The idea
Most filesystem automation lives in two uncomfortable places: Bash scripts that get fragile at scale, or full programs in Go or Python that feel heavy for simple tasks. Soul explores a more declarative way of describing filesystem operations.

The language understands the filesystem as a structure — trees, differences, missing files — rather than just running commands against it.

What it looks like:
backup.soul (full file)

str src = arg("--folderSrc")
str dst = arg("--folderDst")
printStr("Starting backup...")
mkdir(dst)
backup(src, dst)

overview.soul (full file)

str folder = arg("--folder")
overviewinfo ov = overview(folder)
str txt = overviewSummary(ov)
printStr(txt)

These samples compiles to static binaries of about 22KB and 17Kb respectively, with no runtime and no external dependencies.

Some numbers from local tests on Linux + NVMe:

~210K file scan: 0.39s
Incremental copy of ~1.4GB: 1.9s
Docker image (FROM scratch): ~68KB
These are honest local runs, not microbenchmarks.

Something I'm experimenting with: plan mode
One idea I'm exploring is a "plan mode" — where Soul analyzes the program before executing it and tells you exactly what will happen: which files will be copied, deleted, or modified, and how much data is involved.

Not a dry-run flag on top of existing commands, but something built into the language model itself. Deterministic and inspectable before anything touches the filesystem.

This feels like the most interesting direction to me, especially for large or destructive operations where you want visibility before you commit.

Where it lives today
There's a browser-based editor and compiler at soul-run.com where you can write Soul code and download the resulting binary. You can also download test binary files:

https://soul-run.com/binary.download?file=overview
Usage:

chmod +x overview
./overview --folder "/your/folder"

https://soul-run.com/binary.download?file=backup
Usage:

chmod +x backup
./backup --folderSrc "/your/source/folder" --folderDst "/your/destination"

The compiler is currently closed-source while I stabilize the language design.

You can also try the backup tool directly with Docker:

docker run --rm \
  -v /your/source:/src \
  -v /your/destination:/dst \
  soultools/backup:latest \
  --folderSrc /src --folderDst /dst

Or the overview tool:

docker run --rm \
  -v /your/local/folder:/data \
  soultools/overview:latest \
  --folder /data

What I'm still figuring out
Honestly, I'm not sure yet what Soul should become. The binary size is interesting, but the declarative model and the plan mode feel like the more compelling direction. I'm also considering focusing into IoT since ultralight binaries could work great in small and light devices.

I'd love to hear from people working with large filesystem workflows, backup automation, or language design: does this resonate? Are there domains beyond filesystem operations where this model could make sense?

More info: https://soul-run.com/

1 Comment

0 votes
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelski - Apr 23

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolio - Apr 1

My Nginx Died at 2 AM and Nobody Noticed for 6 Hours. Now I Have a Watchdog Script

BashSnippets - May 21
chevron_left
136 Points4 Badges
1Posts
0Comments
Currently learning

PHP, MySQL, Soul, Java, HTML, Javascript,

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!