Replies: 1 comment 1 reply
-
Hey, thank you for bringing up this topic. To make it happend we should start with eliminating C++ dependency, but there are at least 2 blockers for that right now:
For both of them we currently need to provide C++ runtime. There is a goal to remove this dependency, but it had never priority big enough to spend precious resources on that. There's also a long list of functions which are always rechable and linked to allow for safe code lowering, we'd need to handle this as well. However, in my opinion, Scala Native was never aimed to be a target for really low-level programming. The main purpose was to move existing high level language out of the JVM and it's limitations, while keeping similar code semantics and capabilities. In it's current state it's strongly coupled with both GC and runtime using large amount of C stdlib + POSIX/WindowsAPI to reimplement most of Java Standard Library. |
Beta Was this translation helpful? Give feedback.
-
This would allow true bare metal code to be created with clang. I tried specifying it in withCompileOptions but it resulted in javalib failing to compile. I could not find a way to disable the javalib/standard libraries completely.
Edit: It seems like there is also no way to access raw memory manually (using addresses without malloc). It also seems like there's no way to define a custom main entrypoint
Beta Was this translation helpful? Give feedback.
All reactions