Skip to content

Attempt to speed up builds#348

Draft
midnightveil wants to merge 5 commits into
seL4:mainfrom
au-ts:julia/compile-time-optimisation
Draft

Attempt to speed up builds#348
midnightveil wants to merge 5 commits into
seL4:mainfrom
au-ts:julia/compile-time-optimisation

Conversation

@midnightveil

@midnightveil midnightveil commented Jun 5, 2026

Copy link
Copy Markdown

This is half an attempt at working on #347.

I've managed to speed up the change-seL4 rebuilds for microkit building from ~8s to about ~2s (edit: slightly inaccurate), which is quite good. The biggest change was compiling the build script in release mode, which allows bindgen to complete in ~0.2s instead of ~1s; this is not actually included here.

The other change was to make it so the sel4-sys build script doesn't have to be rebuilt so much, by moving some things to runtime config loading (see embedded-config feature flag).

[profile.release.build-override]
opt-level = 2

I think it might be worth making it possible to build the sel4-sys build-script as a generic binary exe (allowing us to compile with strong optimisations separately) and then generate the .rs files, which then we can pipe in (or package with the microkit SDK); this would allow us to parallelise that part of the build and speed it up, instead of having a compile / runtime tradeoff to the same extent.

All of this is quite hacky, and duplicated, and not ready to review.

As per seL4#347

Honestly, one crate not in the critical path is less of
a big issue.

Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
little difference to the microkit compile time though as
not in the critical path

Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
this shaves a couple of crates but barely anything.
I'm still missing a bunch of crates that then get feature unification

Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
…don't need to rebuild less crates

this allows us to compile bindgen + etc with optimisations which does speed up the time by like 1s
as bindgen in release mode is faster

Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant