Dylan Graham introduced the lightweight LWDR runtime for programming microcontrollers using the D language, equipped with a real-time operating system (RTOS). The current version targets ARM Cortex-M microcontrollers. The development does not aim for complete coverage of all D features but provides basic tools. Memory allocation is manual (new / delete), the garbage collector is not implemented, but there are several hooks for using RTOS features.
The presented version supports:
- allocation and destruction of class instances and heap for structures;
- invariants;
- asserts;
- contracts, basic RTTI features (through Typeinfo features);
- interfaces;
- virtual functions;
- abstract and static classes;
- static arrays;
- allocation, deallocation, and resizing of dynamic arrays;
- adding elements to a dynamic array and concatenation of dynamic arrays.
In the status of experimental features: exceptions and Throwables (as they require garbage collector support).
Not implemented:
- constructors and destructors for modules;
- ModuleInfo;
- thread local variables (TLS);
- delegates and closures;
- associative arrays;
- shared and synchronized data;
- hashed objects.
Source: opennet.ru
