LWDR (Light Weight D Runtime) for Microcontrollers v0.2.3

Dylan Graham dylan.graham2000 at gmail.com
Sun May 30 14:28:25 UTC 2021


Github: https://github.com/0dyl/LWDR
DUB: https://code.dlang.org/packages/lwdr

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).

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.

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.

It can be compiled with either GDC or LDC and it is DUB 
compatible.

It has so far been successfully run on a real STM32F407.

LWDR currently supports the following language features:
- Class allocations and deallocations (via new and delete)
- Struct heap allocations and deallocations (via new and delete)
- Invariants
- Asserts
- Contract programming
- Basic RTTI (via TypeInfo stubs)
- Interfaces
- Static Arrays
- Virtual functions and overrides
- Abstract classes
- Static classes
- Allocation and deallocation of dynamic arrays
- Concatenate an item to a dynamic array
- Concatenate two dynamic arrays together
- Dynamic array resizing

The following features are experimental:
- Exceptions and Throwables (so far are working on GDC only)

Not supported:
- Module constructors and destructors
- ModuleInfo
- There is no GC implementation
- TLS (thread local static) variables
- Delegates/closures
- Associative arrays
- Shared/synchronized
- Object hashing
- Other stuff I have forgotten :(

It is beta, so expect bugs.


More information about the Digitalmars-d-announce mailing list