Skip to content

Be able to specify which targets are valid in a workspace #41

@repi

Description

@repi

It would be great to be able to specify which targets are valid and can be used in a project and workspace. Ideally both on the workspace overall as well as on individual projects.

Both to give users an explicit error when trying to build for an unsupported target (instead of a link or compile error somewhere in the code, or worse: runtime panic), as well as to avoid bringing in dependencies for platforms that are not used into Cargo.lock and when vendoring.

We currently have both issues.

  1. We have crates that can only compile and only makes sense for certain targets, specifically native arch vs WASM, some of our crates work for both and some of them only work for one of them. And it is hard to "compile out" the code for the incompatible target in 50+ crates.

  2. Reduce amount of listed dependencies for targets we do not use. We want keep our dependencies as clear and few as possible to be able to review and manage everything we use, and then it is additional work if dependencies that we don't even use from platforms we don't use or support are brought in.

    For example the following targets we do not support: fuchsia, redox, emscripten, freebsd, android, cloudabi.

    And here are a few dependencies in our current Cargo.lock from these unused platforms/targets that we haven't been to get rid of: stdweb, android_glue, errno-dragonfly, fuchsia-zircon, fuchsia-zircon-sys, redox_syscall.

Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions