Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heads-up: #[start] is being removed #1268

Open
RalfJung opened this issue Dec 20, 2024 · 1 comment
Open

Heads-up: #[start] is being removed #1268

RalfJung opened this issue Dec 20, 2024 · 1 comment
Labels
crux MIR Issues relating to Rust/MIR support

Comments

@RalfJung
Copy link

We are planning to remove the unstable #[start] attribute from the compiler, see rust-lang/rust#134299 for rationale and further details. This repo showed up in a search for users of the attribute in this file. For all we know, there's no good reason to use this attribute and you can do the following instead:

#![no_main]

#[no_mangle]
extern "C" fn main(argc: core::ffi::c_int, argv: *const *const u8) -> core::ffi::c_int {
  // ...
}

If that for some reason does not work, please let us know!

@RyanGlScott RyanGlScott added MIR Issues relating to Rust/MIR support crux labels Dec 20, 2024
@RyanGlScott
Copy link
Contributor

Thanks for the heads-up! Note that crux-mir's Rust code is a bit special in that it is a vendored copy of the Rust standard libraries, and it is only meant to build with one particular version of Rust (nightly-2023-01-23) at the moment. We plan on upgrading this Rust version at some point to one where the standard libraries do not use #[start].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crux MIR Issues relating to Rust/MIR support
Projects
None yet
Development

No branches or pull requests

2 participants