Nerves is too resource intensive, but that's the right idea. AtomVM is closer to what I'm thinking, except ideally I want static typing that's interoperable with C, and the readme for the project would be something like: Here is a bunch of C code with some functions you need to fill in. Compile these two files for your device, and fill in all of the second file's function bodies. We maintain versions of the second file for common boards. If you add a c function to the second file, our tooling allows you to call it from the runtime.
C FFI is really critical, as that allows you to use all the existing libraries on a given platform.
So, a runtime language with elixir/erlang features, but with the C FFI of Nim. But Nim is compiled, and we need bytecode for rapid iteration.
The challenge is that what is nearly universal right now is a c compiler, but the board is always different. S7 scheme has the right idea with a single c file, but is too resource intensive and wasn't built for embedded electronics.
There is definitely an unfilled niche for rapid embedded application development. We're either going to get a $4 RPi in a chip someday, or the platform I'm describing needs to be created. Those are the routes I see to embedded RAD.