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 #767

Closed
RalfJung opened this issue Dec 20, 2024 · 1 comment · Fixed by #769
Closed

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

RalfJung opened this issue Dec 20, 2024 · 1 comment · Fixed by #769

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. 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!

@ipetkov
Copy link
Owner

ipetkov commented Dec 21, 2024

Thanks for the heads up! This was only used in some test code that I had copied from elsewhere and I have no problems taking it out 😄

Will be fixed with #769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants