Skip to content

[FR]: Separate toolchain for for C++ headers #3722

@Silic0nS0ldier

Description

@Silic0nS0ldier

What is the current behavior?

As of #3694 the NodeInfo provider includes CcInfo for the NodeJS N-API headers.

While useful for native addon development, this made the node_toolchain depend on the C++ toolchain as that CcInfo instance is pulled from the cc_library target :headers.

For workflows that don't need those headers, they incur the penalty of fetching the C++ toolchain. This can play out as;

  • A sub-second delay while the repo fetches.
  • A much more substantial delay (e.g. if using nixpkgs_cc_configure from https://github.com/tweag/rules_nixpkgs)
  • An error due to the C++ toolchain not being defined.

Describe the feature

Introduce a separate toolchain targeted at native addon development so that plain JS workflows do not implicitly depend on C++ toolchains.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions