Closed rljacobson closed 5 years ago
This is a great idea, and would love to see it in action! However, this feels a bit out-of-scope here:
Unicorn is an emulation library and Unicorn.js is simply a port of that library to JavaScript via Emscripten. Anything that is not present in Unicorn, other than minor wrappers and syntactic sugar, should probably not be shipped alongside Unicorn.js. Consequently I wouldn't call this a "feature request".
Of course, we could create a demo for Unicorn.js that showcases your idea, but honestly the current demo feels "good enough" at showing the usage of the API. Instead, you could either:
As an brief example of other tools that have been built on top of Unicorn.js you can find: https://micropython.org/unicorn/ (sources are also available). I hope that serves as inspiration. :-)
Yeah, I agree on all points. Unfortunately, all of my extra brain cycles have been committed to other things. The Godbolt people have bigger fish to fry, and I suspect that they would see it as out of scope as well.
Well, now who's going to do it? :)
Hook into the Godbolt API to allow compilation of C/C++ to assembly and the execution of that assembly in the Unicorn.js library.
This feature request is inspired by https://github.com/vasyop/miniC-hosting, an in-browser C interpreter and assumbler to MSIL that visualizes machine state for educational putposes.