guild icon
Toit
#Best recommendation for recording / tracking a container version
Thread channel in help
addshore
addshore 02/17/2026 01:45 PM
I'm getting to the point of having CI build 1) a container from an example app 2) combining that with a custom envelope and 3) spitting out a final .bin file for flashing to the ESP
Are there already any best practices I should be following in terms of versioning and having output in logs the version of the container code and or envelope code and or final bin?
I see toit outputs something along the lines of [toit] INFO: starting <v2.0.0-alpha.189> and I think that is from https://github.com/toitlang/toit/blob/0a240593d64c18508fce04a86dae235e191dfef5/src/rtc_memory_esp32.cc#L135
And I think that just comes from -DVM_GIT_VERSION=\"\\\" and
Is that the best pattern probably?
Program your microcontrollers in a fast and robust high-level language. - toitlang/toit
floitsch
floitsch 02/17/2026 01:49 PM
Good question.
We haven't used custom envelopes too much, so there isn't a good guideline yet.
But there are things that are important: if the VM or its interface changes (new primitives), then the compiler and the envelope need to match. If you just add a services, that's not necessary.
The compiler checks (or should) that the envelope version and the compiler version matches. Unless you build the Toit VM with the envelope and use that one, you need to ensure that the version is one of the published ones.

I think I would "force" the envelopes version to be one of the published ones, so that you can continue using published tools. (unless you changed the API).
addshore
addshore 02/17/2026 01:52 PM
Right now these are the variants we have, so very minimal changes really, just sizing https://github.com/lightbug-io/toit-envelopes/tree/main/variants
And this is just a hijacked version of the envelope toit repo, with the only modificatios being these partition files
Contribute to lightbug-io/toit-envelopes development by creating an account on GitHub.
addshore
addshore 02/17/2026 01:52 PM
so actually in terms of envelope version, its likely OK for me to mostly rely on[toit] INFO: starting <v2.0.0-alpha.189> for now :๐Ÿ˜›:
floitsch
floitsch 02/17/2026 03:30 PM
If it's just partition size you shouldn't need custom envelopes anymore
floitsch
floitsch 02/17/2026 03:31 PM
At the very least Artemis supports the partition as a separate argument.
floitsch
floitsch 02/17/2026 03:32 PM
Also note that the envelopes repository has some common partition tables in their releases (for that exact purpose).
7 messages in total