On Sunday, 30 May 2021 at 14:28:25 UTC, Dylan Graham wrote:
Hi, all!
This is LWDR (Light Weight D Runtime) It is a ground-up implementation of a D runtime targeting the ARM Cortex-M microcontrollers and other microcontroller platforms with RTOSes (Real Time Operating Systems).

Sounds very useful! However, first thing first: What's the license? DUB package says it's FOSS. Great, but what kind of FOSS? It makes a big difference whether it's GNU or BSD, for instance.


It doesn't, and possibly may not, support all D features in order to make it viable for the constrained environments. For example, all memory allocation is manually done via `new` and `delete` - no GC.

Regarding `new` - is there a good way to iterate though chunks allocated with `new`? One could call an unmodified piece of D code that normally uses the GC, and then manually free all it's allocations.


It works by providing a series of barebones API hooks (alloc, dealloc, assert, etc) (defined in `rtoslink.d`), which you must implement and/or point to your RTOS implementation.

Quickly looking, the implementation looks very portable, save for exceptions. with `rtoslink.d`, this will probably enable a lot of stuff on any platform without DRuntime. Not just microcontrollers. If I'm right, you just did a BIG service for D on bare-metal.

It is beta, so expect bugs.

And open source, so the bugs can be fixed as discovered :-). Thanks for the warning anyway.

Reply via email to