Skip to content

Commit c8d407a

Browse files
committed
README: Add dependencies idea
1 parent cad9edb commit c8d407a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,24 @@ end of the spectrum.
140140

141141
Not set in stone, but some ideas for the future...
142142

143+
## Dependencies
144+
145+
Not often, but sometimes, I have a binary that depends on another binary being built.
146+
For example, when embedding a client binary inside a server binary, or for one tool
147+
to use another.
148+
149+
I think we can handle this:
150+
151+
``` go
152+
// In the above client/server case, the client would set this:
153+
//go:multibuild:after=../cmd/server # is built after the current multibuild
154+
// And the server would set this:
155+
//go:multibuild:before=../cmd/client # is built before the current multibuild
156+
```
157+
158+
Then running builds in either client or server would always ensure builds of the
159+
dependencies were also rebuilt at the appropriate time.
160+
143161
## iOS / Android
144162

145163
Some platforms (particularly `android` and `ios`) require `CGO_ENABLED=1`

0 commit comments

Comments
 (0)