Replies: 3 comments 10 replies
-
Yeah, what I'd like to do is to make the necessary OS interface minimal and easy to find and extend. This can be a pain but if we isolate the modules right the pure D bits on top of the OS interface can be pretty easily reused and if they don't call into each other and/or can be versioned out you can strip things down a bit that way, just not using parts you don't need and letting the linker leave them behind. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is at least something I'm keen on since I have ported and want to port druntime to custom systems. One thing I want to do is make druntime not dependent on any GC. That which means manual allocations and/or relying on containers that handles memory themselves. I hope that druntime isn't that complicated as Phobos so that this is possible without too much work. I know that nogc isn't really a goal with openD but I would still like that druntime is kept as tight as possible without any dependencies to grand memory infrastructures. This opens up druntime to be used in embedded systems where people wants to handle memory allocations themselves and still be able to use the openD druntime interface for system functions. Also there are work in the old D project that tries to split up the code so that we don't have version identifier hell. I'm not sure if/how that work will be merged. However, since we have decided to depart from version, I suggest that we can choose what to include in druntime on a needed basis. For example a certain OS doesn't support files or networking and there is a possibility to omit those in the build of druntime. Another goal would be to remove the dependency of the C library. The C library could be supported as a target for druntime but I would also like that druntime has the option to use the OS API directly instead of going through C lib. Another thing I would like to as an addition to druntime is a native API for asynchronous IO. This is huge job in itself and it kind of relies on removing all the version hell because trying to be productive in its current state is very difficult. This is certainly a job for several people for quite some time. |
Beta Was this translation helpful? Give feedback.
-
2All: Please don't forget about this proposal: dlang/dmd#15887
druntime is already near to minimal, as for me
My testing binary for ARM was decreased from ~500Kb to ~400Kb - that is significant for embedded MCUs what provide exactly 512Kb of ROM |
Beta Was this translation helpful? Give feedback.
-
I think this issue has always been discussed by the D community about the lack of portability of Drt for embedded devices.
Is it intended to create a minimum druntime?
Currently, I use ldmd2 more often than dmd and think about the lack of support for
linux-musl
andwindows-mingw
with druntime and stdlib (phobos). This is a painful experience!Last time, I tried to run openwrt on mipsel router, I needed to do a hack involving
zig cc
withllvm-libunwind
+ customobject.d
(empty).Work? Yes!
Same result on
windows-mingw
.I don't know if the possibility of allowing users to use an abstract interface to create their custom druntime, reusing
core.druntime
(minimum runtime) as a base, has been considered.Beta Was this translation helpful? Give feedback.
All reactions