Audience | WG-wasm + cargo team (+ maybe WG-embedded?) |
---|---|
When | TBD (45 minutes) |
Where | Snow |
Meeting Style | Discussion and brainstorming |
Deliverables
- Sketch of an eventual ideal we’d like to end up at
- Sketch of a minimal RFC that is a first step towards that eventual ideal
Agenda
- Intro to the kind of thing we are talking about here (5 minutes)
- What sorts of “post-build”/etc tasks do we do for wasm, that we would like to hook into
cargo
- What sorts of “post-build”/etc tasks do we do for wasm, that we would like to hook into
- Define a long-term ideal state we would like to eventually reach (20 minutes)
- Map out a series of smaller incremental steps we can take to reach that (20 minutes)
- And these steps could be a succession of RFCs
+Embedded use cases for Cargo build hooks
- doesn’t make sense for libraries on crates.io
- only for binaries and dylibs
- we don’t want to run dependencies’ post-build hooks
- how do we make incremental work?
- how does cargo know when to re-execute this?
[post-build-dependencies]
inCargo.toml
?- alternatively, should we have build tasks instead of post-build scripts?
- depend on a package, and we just run whatever is in the package
- takes a generic build script of some kind from that package and runs it
- how does it communicate its dependencies and how do we give it its inputs?
- how do different targets work?
- maybe reuse build.rs for post-builds
- then we can skip post-build-dependencies in Cargo.toml?
- would still have to have some sort of flag turned on in Cargo.toml
- no implicit rerun-if for everything like build.rs has
- you have to explicitly say the things you depend on (other than the artifact you’re being run on)
- incremental steps we can take to move this forward:
- create RFC for minimal post-build.rs
- write minimal rust code
- ability to depend on crates
- needs to know:
- output artifact(s) location in target dir
- metadata on artifact config (opt-level, target, etc)
- can read
Cargo.toml
for extra metadata - location of lockfile
- am I running for a cdylib or a bin or a …
cargo:output-artifact=…
- create RFC for minimal post-build.rs