This is pretty cool. I've been interested in runnable code in markdown for a long time. It's a kind of "literate programming¹" which I've always thought was one of Knuth's best ideas.
More prior art: xcfile²
I've used xc³ for a long time now and it's fairly solid. The idea of runnable markdown is definitely useful. A lot of projects have attempted it and none that I've seen have achieved what I'd call perfection, however, xc gets close enough for my needs.
I'll check out Ledge a bit more thoroughly and give some feedback if I can think of anything constructive. I think xc is probably more suited for my uses, however, I do like electrobun and that seems like a good runtime to build something like this.
Here's what I like about xc:
1. It's built with GO and brings all the power of go's template engine. The portability of go's runtime means that it is just one binary and doesn't have any crazy runtime dependencies.
2. It has a built in dependency system so that each block of code can be predicated on another block completing. It can also ensure that each block in a dependency chain runs just once.
I've built a sort of configuration management system for my home infrastructure with config files in a git repo and all the deployment scripts and dependencies directly in the readme. I use it to maintain and deploy changes to my router, firewall rules, dhcp and dns, git repositories, and various containers.
Here's an ancient post that I wrote about the subject back before I even discovered xc: https://phabricator.wikimedia.org/phame/post/view/217/runnab...