dlang / project-ideas

Collection of impactful projects in the D ecosystem
36 stars 12 forks source link

Baremetal D runtime #9

Closed burner closed 5 years ago

burner commented 5 years ago

Many features in the standard library are implemented by using the C runtime. Reusing the rock-solid work of generations of programmers makes a lot of sense as just outputting via `printf` can be very complex. However, for embedded environments a programmer often only has a tiny amount of storage available or might not even have a C runtime available for his target. The idea of this project is to implement the most basic parts of the runtime natively in D, s.t. bare metals programmers can just compile for their target. Implementing features natively in D also means that other targets like Web Assembly will automatically be able to use them too. Another advantage of implementing these basic building blocks in D is that one can take advantage of D\'s Compile-Time Function Evaluation (CTFE) and optimize the methods even further at compile-time.

Project focus: - Implement memcpy, memcmp and similar in D (with similar performance to C) - Implement `malloc` and similar in D (with similar performance to C)

Starting points:

baziotis commented 5 years ago

This idea is pretty much this: https://github.com/dlang/projects/issues/26 project

burner commented 5 years ago

superseded by #26