Thread overview
druntime homebrew: setup and compile a single project with its own stdlib
Oct 28
Hipreme
October 28

I want to play with reimplementing some tiny set of standard D library, mostly for language learning, and need some advice

  • is it possible to use dub both for building custom druntime and test app?
  • or I must write some batch or Makefile and call dmd compiler directly onto every file?
  • what dmd/dub command line options forces it to drop system-wide druntime/phobos and use custom local .so / .a library in place of it?
October 28

On Saturday, 28 October 2023 at 18:37:37 UTC, Dmitry Ponyatov wrote:

>

I want to play with reimplementing some tiny set of standard D library, mostly for language learning, and need some advice

  • is it possible to use dub both for building custom druntime and test app?
  • or I must write some batch or Makefile and call dmd compiler directly onto every file?
  • what dmd/dub command line options forces it to drop system-wide druntime/phobos and use custom local .so / .a library in place of it?
>
  • is it possible to use dub both for building custom druntime and test app?
    Yes, my engine does that
>

what dmd/dub command line options forces it to drop system-wide druntime/phobos and use custom local .so / .a library in place of it?

If you have a module source file with the same name you want to replace, the build will prioritize your own version.

October 29
>

If you have a module source file with the same name you want to replace, the build will prioritize your own version.

You mean I can create project/druntime, and replace the core D runtime part by part by placing here my own files from druntime source?

And compiler will route his internal callbacks etc into my own partial stdlib without any undocumented options or .a/.so prebuilding ?