Skip to content

Proposal: TINYGOTOOLCHAIN - Toolchain version management for TinyGo #5202

@sivchari

Description

@sivchari

Summary

Add Go 1.21-style toolchain version management to TinyGo, enabling reproducible builds by specifying the required TinyGo version.

Motivation

The motivation that I propose is to reproducible builds. I sometime want to ensure the same TinyGo version is used across different machines.

Proposed Design

We add new env value like TINYGOTOOLCHAIN following the GOTOOLCHAIN.
The usage is like this

# Use specific version (auto-download if not cached)
TINYGOTOOLCHAIN=tinygo0.40.1 tinygo build

# Use only system-installed TinyGo
TINYGOTOOLCHAIN=local tinygo build

If the specific version is not cached, it automatically downloads the version from GitHub releases. I don't determine the destination where TinyGo which installed via TINYGOTOOLCHAIN yet, so would like to discuss it.

If it make sense to you, I'd like to implement this feature. What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions