Hacking Phobos
Difference (last change) (no other diffs, normal page display)
Changed: 1c1,3
This page aims to explain how to contribute to the Phobos standard library. |
Contributions to Phobos will go through a review process, [[link][url=![]() While writing source code for D, keep the ![]() |
Contributions to Phobos will go through a review process, read more here.
While writing source code for D, keep the D Style in mind.
Building DMD, druntime and Phobos
1. You need to download and install the following tools:
- the LATEST version of the DMD compiler and tools
http://dlang.org/download.html. The other compilers are usually somewhat behind DMD.
- git
- DVM:
https://bitbucket.org/doob/dvm
Clone dmd, druntime and phobos to <path> from github:
git cloneThen create a branch for making your changes.https://github.com/D-Programming-Language/druntime.git <path> git clone
https://github.com/D-Programming-Language/dmd.git <path> git clone
https://github.com/D-Programming-Language/phobos.git <path>
git branch mychanges git checkout mychangesThis way you can edit source files to your heart's content since you can easily and switch back to the master branch whenever you mess something up.
3. Run "dvm compile <path>". This will compile dmd, druntime and phobos (in this order) and setup a correct dmd.conf file. The binary will be placed in <path>/dmd/bin<arch>.
You can create a build script, <path>/phobos/build.sh, looking something like this:
#!/bin/bash dvm compile .. rdmd --compiler=../dmd/bin<arch>/dmd --build-only main.dmain.d and build.sh can be added to <path>/phobos/.git/info/exclude to be ignored.
4. After a fresh cutting edge phobos builds and runs successfully, make sure Phobos unittests all pass (make -fposix.mak unittest).