rust-ctor icon indicating copy to clipboard operation
rust-ctor copied to clipboard

Refresh project a bit

Open maxwase opened this issue 3 years ago • 2 comments

Update documentation, fix clippy lints, replace libc print macro in some places

Proofs:

MSRV for std printing in dtor:

#[ctor]
fn sturtup() {
    println!("Staring...");
}

fn main() {
    println!("Running...");
}

#[dtor]
fn shutdown() {
    println!("Shutting down!");
}

image

Print in ctor works on 1.31

image

maxwase avatar Aug 19 '22 20:08 maxwase

Hi, thanks for this patch. Give me a bit to look at it. Do you have a link to the Rust changeset allowing println in shutdown?

I think I want to split this patch into two: one removing the libc_* methods and the other with general cleanup. I'll take a look at this and can split it manually.

mmastrac avatar Aug 22 '22 15:08 mmastrac

Hi, thanks for this patch. Give me a bit to look at it. Do you have a link to the Rust changeset allowing println in shutdown?

I think I want to split this patch into two: one removing the libc_* methods and the other with general cleanup. I'll take a look at this and can split it manually.

I'm not sure what PR added an ability to use print in shutdown, I've just bisected it though compiler versions UPD: Possibly this PR https://github.com/rust-lang/rust/pull/76275/

Also I of course can split this into two PR's, seems rational

maxwase avatar Aug 22 '22 15:08 maxwase