Skip to content

Expose compile-target OS and architecture as host facts #190

Closed

Description

@zackees

Refs #155. FastLED currently depends on ctcb-core solely for Target::current(), which reads compile-time OS and std::env::consts::ARCH. Add a lightweight platform::host process_target API with facade-owned data, explicitly describing the executing binary target rather than physical hardware or runtime emulation detection. Keep package aliases and supported-toolchain policy in FastLED. No new dependency or feature needed. Add native/cross-target contract tests. Coordinated with FastLED/cli#242; exact published release adoption remains required.

Activity

  1. zackees commented on Sep 16, 2026

    @zackees
    CollaboratorAuthor

    This is complete on both sides; closing with the evidence chain rather than leaving it open.

    kernal-api — implemented in #191 (feat: expose binary compile-target identity). platform::host::process_target() is a const fn returning facade-owned ProcessTarget { os, architecture } as &'static str, documented exactly as this issue specified: the executing binary's compile target, "not the physical host hardware", naming Rust's target vocabulary, with alias and toolchain policy left to the caller, and explicitly no Rosetta, CPU-feature or ABI detection.

    The native/cross-target contract tests asked for are tests/process_target.rs:

    const TARGET: ProcessTarget = process_target();   // const-ness proven at compile time
    assert_eq!(TARGET.os, std::env::consts::OS);
    #[cfg(target_os = "windows")] assert_eq!(TARGET.os, "windows");
    #[cfg(target_arch = "x86_64")] assert_eq!(TARGET.architecture, "x86_64");

    FastLED — adoption landed with FastLED/cli#242, which is merged. crates/fastled-cli/src/install.rs now reads:

    let target = kernal_api::platform::host::process_target();

    and ctcb-core — the sole reason this issue existed, since it was depended on only for Target::current() — is absent from the direct dependency list. Adoption is through the pinned v0.1.6 release tag with no path or revision override, which satisfies the "exact published release adoption" requirement. The only remaining ctcb references in that repository are the vscode-plugin's own clangd distribution tooling and the migration document, not the Rust crate.

    No new dependency or feature was needed, as this issue predicted.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions