Replies: 3 comments 4 replies
-
To reiterate a bit from the May Project Update, my big design idea is to introduce the concept of "variables" at the recipe level. As a basic example: export default function curl() {
return std.runBash`
# Build curl from source
./configure && make && make install
`
.workDir(source)
.dependencies(std.toolchain, openssl)
.hostPlatform(std.variable("hostPlatform"))
.targetPlatform(std.variable("targetPlatform"));
} The export default function () {
// Build curl for x86-64 Linux
const curlX64 = curl().setVariable({ targetPlatform: "x86_64-linux" });
// Build curl for aarch64 Linux
const curlArm = curl().setVariable({ targetPlatform: "aarch64-linux" });
// Combine into a directory
const curls = std.directory({
"curl-x86-64-linux": curlX64,
"curl-aarch64-linux": curlArm,
});
// Create a tarfile for the directory
return createTarfile(curls);
} This is maybe a niche example. Most packages probably wouldn't ever use |
Beta Was this translation helpful? Give feedback.
-
From drylippedurchin on Zulip:
And definitely 👍 that we'll need to support this! Wanted to put a top-level comment for this because there's a few related questions in this space:
|
Beta Was this translation helpful? Give feedback.
-
So after reading about The I like this idea because it allows for cross compilation logic to be |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context / other discussions:
At the time of writing, Brioche supports native builds for
x86_64-linux
andaarch64-linux
(nightly-only), but we don't have any explicit support for cross-compilation today. To support cross-compilation, we will fundamentally need a few new things:--target
flag, e.g.:brioche build --target aarch64-linux
.brioche-packages
).Beyond that, we have a lot of freedom to maneuver, but there are a lots of big and little design decisions and trade-offs that need to be made!
Beta Was this translation helpful? Give feedback.
All reactions