cretz / software-ideas

85 stars 0 forks source link

Machine Code to WASM Compiler #69

Open cretz opened 6 years ago

cretz commented 6 years ago
cretz commented 6 years ago

Well, now I'm wondering if there is value in ARM compilation for Android apps. I wonder how many phone apps are native yet don't use JITs tho...probably few since most use the Android JVM which uses JIT.

cretz commented 6 years ago

Well, one use case is for an online emulator that does a JIT to WASM on ROM load. Ideally, the device to emulate would:

cretz commented 6 years ago

Another use case - Go, D, and any other non-LLVM compiler

I did some research on disasm libs:

TylerSeppala commented 2 years ago

Hey, I know I'm finding this years later but if you actually have a solid approach to making this happen, or maybe even have a start on it, I've got a use-case. I'm building a program in wasm to run in the browser, but there are a lot of pre-existing plugins people in this particular market are dead set on using. If I want to win over a decent portion of said market, I'm going to have to support these plugins (I'm being vague because I don't want to inspire any competition in this space). Problem is, they are all pre-compiled DLLs, originally written in C++. The only way to truly get them to work with what I'm doing would be to convert the machine code directly into wasm and dynamically link it to my project. I'm sure there are others out there with projects in entirely different markets that also rely on commonly used DLLs, and that would benefit greatly from a solution for porting them to the web and linking them to other wasm modules. Let me know if you still have any intention of doing this, or maybe some pointers you could give me beyond this thread. I'm probably gonna end up trying to build something like this one way or another.

cretz commented 2 years ago

Nice! Afraid I don't have any intentions or insight on doing this, but I do agree it would be cool.

TylerSeppala commented 2 years ago

Oh man, well I figured it couldn't hurt to ask. I'll come back when I have a decent start on it, maybe some people watching this will be interested.