Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can AOT compilations run without an operating system? #393

Closed
ghost opened this issue May 2, 2018 · 3 comments
Closed

Can AOT compilations run without an operating system? #393

ghost opened this issue May 2, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented May 2, 2018

Is it possible to place compiled binary into address 0 and execute it without an operating system?

@Peter-B-Kessler
Copy link
Contributor

The binaries SubstrateVM generates still need a linker, for references to libraries and relocation of symbols. I think of those as coming from the operating system. We rely on the OS for things like thread creation, mutexes and condvars, etc. How much "without an operating system" are you thinking of?

@olpaw
Copy link
Member

olpaw commented May 3, 2018

@ashtonhogan, although we currently do not support it, conceptually this is quite possible. One could take a bare-metal C library like newlib and customize the linking step of our image building to output a bare metal executable that would run on a system without OS. Now if you combine that with the ongoing efforts to have a decent ARM64 backend for Graal this could take an interesting direction.

@ghost
Copy link
Author

ghost commented May 3, 2018

Now if you combine that with the ongoing efforts to have a decent ARM64 backend for Graal this could take an interesting direction.

@olpaw My thoughts exactly. It would be awesome if I could take my ARM device and skip all the fuss with OS, etc and just control hardware directly.

Even better, if the same thing could be applied to arduino so that I can do the same for many more input and output devices in a minimal fashion (no OS every time).

It seems there are some cases where the OS is just excess baggage. Also, many devs want to code in the language they're most comfortable with and would like access to these devices but are perhaps deterred by the learning curve of learning the low-level aspects.

This meme may come to mind:

I just wanted water

upgrading-fridge

If this feature were carried out to completion, I can see this being key in the IoT world especially. You don't have to cater to every single input and output device btw. Let the market participate and provide their own libraries. (compiled with or without graal - option to leave makes people less likely to leave)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants