You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-35Lines changed: 69 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,50 @@
1
1
# Redub - Dub Based Build System
2
2
[](https://github.com/MrcSnm/redub/actions/workflows/ci.yml)
3
3
4
-
5
-
## Running redub without having it on path
4
+
## Redub for dub users
6
5
- Change directory to the project you want to build and enter in terminal `dub run redub`
7
-
- You may also get help by running `dub run redub -- --help`
8
-
- If you're unsure on how to update redub to the latest version using dub, you may also do `dub run redub -- update`
6
+
> To fully take advantage of redub speed, you might as well use redub directly.
9
7
10
8
## Building redub
11
-
- Enter in terminal and execute `dub`
9
+
- Enter in terminal and execute [`dub`](https://github.com/dlang/dub)
12
10
- Highly recommended that you build it with `dub build -b release-debug --compiler=ldc2` since this will also improve its speed on dependency resolution
13
-
- I would also add redub/bin to the environment variables, with that, you'll be able to simply execute `redub` in the folder you're in and get your project built and running
14
-
- After having your first redub version, you may also update redub by entering on terminal `redub update`. This will download the latest version, rebuild redub with optimizations and replace your current redub executable
15
11
16
-
## Using its library API
17
12
18
-
The usage of the library APIispretty straightforward. You get mainly 2 functions
19
-
1.`resolveDependencies` which will parse the project and its dependencies, after that, you got all the project information
20
-
2.`buildProject` which will get the project information and build in parallel
13
+
# Redub Additions
14
+
Those are the additions I've made over dub
15
+
- Self Update: `redub update` will either sync to the latest repo (and build it) or replace it with latest release
16
+
-[Compiler Management](#compiler-management) - Support to change default compiler and install on command line
17
+
-[Redub Plugins](#redub-plugins) - Alternative to rdmd. Execute arbitrary D code in the build steps.
18
+
-[Multi Language](#multi-language) - Compile a C project together and include it on the linking step
19
+
-[Library API](#using-its-library-api) - Integrate redub directly in your application
20
+
- Watching Directories - `redub watch`- Builds dependents automatically on changes. Add `--run` to run the program after building.
21
+
- MacOS Universal Builds - `redub build-universal` - Generates a single binary containing arm64 and x86_64 architectures on MacOS
21
22
22
-
```d
23
-
import redub.api;
24
-
import redub.logging;
25
23
26
-
void main()
27
-
{
28
-
import std.file;
29
-
//Enables logging on redub
30
-
setLogLevel(LogLevel.verbose);
24
+
## Redub Help
25
+
-[Original Dub Documentation](https://dub.pm/)
26
+
- You may also get help by running `dub run redub -- --help` or simply `redub --help`
31
27
32
-
//Gets the project information
33
-
ProjectDetails d = resolveDependencies(
34
-
invalidateCache: false,
35
-
std.system.os,
36
-
CompilationDetails("dmd", "arch not yet implemented", "dmd v[2.105.0]"),
/** 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
/** 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
With 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
99
133
specify both D and C at the same time `redub --cc=gcc --dc=dmd`. Which will use DMD to build D and GCC to C.
0 commit comments