Skip to content

Add (or make visible in docs) build tags for conditional compilation for target #3375

Open
@andrewfstratton

Description

@andrewfstratton

When a module needs to be different for different devices - e.g. badger2040 and pybadge (where the displays have different devices, etc.) it would be great to allow for something like Go's ability to have one of:

  1. filename identification for a target to allow only the relevant module to be built for a target device. e.g. something like the go os/architecture module name - but this would probably need to be - package_os_arch_target.go.
  2. build tags in the module - though deciding on which style to use might be an issue and also some technical debt (since I think tinygo is not yet up to go:build version yet)

I imagine that filename based is quicker, easier and incurs less technical debt (at present) and should be sufficient for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about usage of TinyGo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions