Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

PSA: #[fuchsia::component] is now #[fuchsia::main]

23 views
Skip to first unread message

Adam Perry

unread,
Apr 1, 2022, 12:32:26 PM4/1/22
to rust-...@fuchsia.dev

You can skip this email if you don't use //src/lib/fuchsia in your Rust programs.


The Rust WG has been looking at the API of the fuchsia crate and we're going to rename the #[fuchsia::component] macro to #[fuchsia::main]. The macro has worked in host-side binaries for a while now, but the component naming implies that it has Fuchsia-specific features. We believe the new name reflects the macro's role more accurately, reduces confusion about when it's useful, and aligns with common names in the broader Rust ecosystem.


Because new usages of #[fuchsia::component] are being written on a regular basis, this will be executed as a soft transition. The new name is live on ToT with a temporary alias to the old name, and we will be sending CLs in the coming days to migrate existing users to #[fuchsia::main] before removing the old name.


If you have any questions please ask here, in Ruschsia, or file bugs in Rust>lib>Fuchsia.


Thanks!

Adam Perry & Marie Janssen on behalf of the Rust WG

Adam Lesinski

unread,
Apr 1, 2022, 8:52:53 PM4/1/22
to Adam Perry, rust-...@fuchsia.dev
The new name makes a lot of sense, thanks for making this change!

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "rust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust-users+...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/rust-users/CA%2BvriKcmck%2BKF2G4AKP0TePRMKn5BVUsw9dV17sa5827-wnKLA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages