{"id":28362056,"url":"https://github.com/mrcsnm/redub","last_synced_at":"2026-03-05T12:01:55.407Z","repository":{"id":215701454,"uuid":"739552679","full_name":"MrcSnm/redub","owner":"MrcSnm","description":"Alternative implementation of dub, speed and consistency oriented","archived":false,"fork":false,"pushed_at":"2025-12-20T15:42:32.000Z","size":2039,"stargazers_count":54,"open_issues_count":4,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-22T18:07:09.630Z","etag":null,"topics":["build-tool","building","compiling","d","dlang","dub","linking","multi-threaded"],"latest_commit_sha":null,"homepage":"https://code.dlang.org/packages/redub","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrcSnm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-05T21:07:21.000Z","updated_at":"2025-12-20T15:42:35.000Z","dependencies_parsed_at":"2024-05-08T17:04:27.912Z","dependency_job_id":"200d240e-f8f7-4fc7-b41f-4dd6b6abc0b0","html_url":"https://github.com/MrcSnm/redub","commit_stats":null,"previous_names":["mrcsnm/dubv2","mrcsnm/redub"],"tags_count":294,"template":false,"template_full_name":null,"purl":"pkg:github/MrcSnm/redub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrcSnm%2Fredub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrcSnm%2Fredub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrcSnm%2Fredub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrcSnm%2Fredub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrcSnm","download_url":"https://codeload.github.com/MrcSnm/redub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrcSnm%2Fredub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30123729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","building","compiling","d","dlang","dub","linking","multi-threaded"],"created_at":"2025-05-28T14:09:43.454Z","updated_at":"2026-03-05T12:01:55.402Z","avatar_url":"https://github.com/MrcSnm.png","language":"D","readme":"# Redub - Dub Based Build System\n[![Update release and nightly](https://github.com/MrcSnm/redub/actions/workflows/ci.yml/badge.svg)](https://github.com/MrcSnm/redub/actions/workflows/ci.yml)\n\n## Redub for dub users\n- Change directory to the project you want to build and enter in terminal `dub run redub`\n  \u003e To fully take advantage of redub speed, you might as well use redub directly.\n\n## Building redub\n- Enter in terminal and execute [`dub`](https://github.com/dlang/dub)\n- Highly recommended that you build it with `dub build -b release-debug --compiler=ldc2` since this will also improve its speed on dependency resolution\n\n\n# Redub Additions\nThose are the additions I've made over dub\n- **Self Update**: `redub update` will either sync to the latest repo (and build it) or replace it with latest release\n- [**Compiler Management**](#compiler-management) - Support to change default compiler and install on command line\n- [**Redub Plugins**](#redub-plugins) - Alternative to rdmd. Execute arbitrary D code in the build steps.\n- [**Multi Language**](#multi-language) - Compile a C project together and include it on the linking step\n- [**Library API**](#using-its-library-api) - Integrate redub directly in your application\n- **Watching Directories** - `redub watch`- Builds dependents automatically on changes. Add  `--run` to run the program after building.\n- **MacOS Universal Builds** - `redub build-universal` - Generates a single binary containing arm64 and x86_64 architectures on MacOS\n\n\n## Redub Help\n- [Original Dub Documentation](https://dub.pm/)\n- You may also get help by running `dub run redub -- --help` or simply `redub --help`\n\n\n\n## Compiler Management\n- Installing new compilers, use `redub install`:\n  ```\n  redub install requires 1 additional argument:\n          opend: installs opend\n          ldc \u003cversion?|help\u003e: installs ldc latest if version is unspecified.\n                  help: Lists available ldc versions\n          dmd \u003cversion?\u003e: installs the dmd with the version 2.111.0 if version is unspecified\n  ```\n- Using the new compilers, use `redub use` - Redub use will also install if you don't already have it:\n  ```\n  redub use requires 1 additional argument:\n        opend \u003cdmd|ldc\u003e: uses the wanted opend compiler as the default\n        ldc \u003cversion?\u003e: uses the latest ldc latest if version is unspecified.\n        dmd \u003cversion?\u003e: uses the 2.111.0 dmd if the version is unspecified.\n        reset: removes the default compiler and redub will set it again by the first one found in the PATH environment variable\n  ```\n\n\n## Redub Plugins\n\nRedub has now new additions, starting from v1.14.0. Those are called **plugins**.\nFor using it, on the JSON, you **must** specify first the plugins that are usable. For doing that, you need to add:\n\n```json\n\"plugins\": {\n  \"getmodules\": \"C:\\\\Users\\\\Hipreme\\\\redub\\\\plugins\\\\getmodules\"\n}\n```\n\nThat line will both build that project and load it inside the registered plugins (That means the same name can't be specified twice)\n\nThe path may be either a .d module or a dub project\n\u003e WARNING: This may be a subject of change and may also only support redub projects in the future, since that may only complicate code with a really low gain\n\nRedub will start distributing some build plugins in the future. Currently, getmodules plugins is inside this repo as an example only but may be better used.\nOnly preBuild is currently supported since I haven't found situations yet to other cases.\nFor it to be considered a redub plugin to be built, that is the minimal code:\n\n```d\nmodule getmodules;\nimport redub.plugin.api;\n\nclass GetModulePlugin : RedubPlugin {}\nmixin PluginEntrypoint!(GetModulePlugin);\n```\n\nFor using it on prebuild, you simply specify the module and its arguments:\n```json\n\"preBuildPlugins\": {\n  \"getmodules\": [\"source/imports.txt\"]\n}\n```\n\n**Useful links regarding plugins:**\n- [**GetModule plugin**](./plugins/getmodules/source/getmodules.d)\n- [**Example Usage**](./tests/plugin_test/dub.json)\n\n## Multi language\n\nRedub has also an experimental support for building and linking C/C++ code together with D code. For that, you need to define a dub.json:\n```json\n{\n  \"language\": \"C\"\n}\n```\n\n## Using its library API\n\nThe usage of the library APIispretty straightforward. You get mainly 2 functions\n1. `resolveDependencies` which will parse the project and its dependencies, after that, you got all the project information\n2. `buildProject` which will get the project information and build in parallel\n\n```d\nimport redub.api;\nimport redub.logging;\n\nvoid main()\n{\n  import std.file;\n  //Enables logging on redub\n  setLogLevel(LogLevel.verbose);\n\n  //Gets the project information\n  ProjectDetails d = resolveDependencies(\n    invalidateCache: false,\n    std.system.os,\n    CompilationDetails(\"dmd\", \"arch not yet implemented\", \"dmd v[2.105.0]\"),\n    ProjectToParse(\"configuration\", getcwd(), \"subPackage\", \"path/to/dub/recipe.json (optional)\")\n  );\n\n  /** Optionally, you can change some project information by accessing the details.tree (a ProjectNode), from there, you can freely modify the BuildRequirements of the project\n  * d.tree.requirements.cfg.outputDirectory = \"some/path\";\n  * d.tree.requirements.cfg.dFlags~= \"-gc\";\n  */\n\n  //Execute the build process\n  buildProject(d);\n}\n```\n\n\nWith that, you'll be able to specify that your dependency is a C/C++ dependency. then, you'll be able to build it by calling `redub --cc=gcc`. You can also\nspecify both D and C at the same time `redub --cc=gcc --dc=dmd`. Which will use DMD to build D and GCC to C.\n\nYou can see that in the example project: [**Multi Language Redub Project**](./tests/multi_lang/dub.json)\n\n\n[**Project Meta**](META.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcsnm%2Fredub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrcsnm%2Fredub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrcsnm%2Fredub/lists"}