Skip to content

[native_assets_cli] Non-predefined targetOS #1258

@dcharkes

Description

@dcharkes

We should support an open ended OS-list.

  • Flutter tools wants to move away from having a predefined list of OSes.
  • There are other embedders (non-Dart-standalone, non-Flutter) that run on other OSes than the 5 predefined OSes.

Currently the JSON format uses a string for target OS, so this is extensible.

However, the Dart API currently has only the 5 predefined OSes available. We should make this extensible in the API.

This is related to working with open ended asset types, or open ended JSON format for config/output in general:

Secondly, helper packages should also be extensible. For example a package that has C source code and uses native_toolchain_c should be able to somehow build for these other OSes. There is probably multiple options for this:

  1. Make PRs for such packages to support your own OS.
  2. Ensure packages have some kind of callbacks/pluggability to add support for other OSes. (But how would that work? Dependency injection?)

Thanks for the input @johnmccutchan!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onpackage:hooks

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions