Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Ship a 1.0 release #9

Closed
5 tasks done
thejpster opened this issue Jan 7, 2020 · 8 comments
Closed
5 tasks done

Ship a 1.0 release #9

thejpster opened this issue Jan 7, 2020 · 8 comments

Comments

@thejpster
Copy link
Contributor

thejpster commented Jan 7, 2020

Part of rust-embedded/wg#383

Blockers:

@jonas-schievink
Copy link
Contributor

I've done a short review of the API:

  • init_array, pre_init_array and run_init_array are undocumented and (AFAIK) not really used in the Rust world. Do we want to remove them?
  • init_data and zero_bss take a T: Copy parameter for which all T-sized byte sequences, or mem::zeroed() must be a valid inhabitant, respectively. This should be documented and ideally enforced via an additional trait bound. Practically T is always set to some unsigned integer type of machine word size, I think.
    • The additional trait bound could also enfore the "mem::size_of::<T>() must be non-zero" invariant at compiletime

@Disasm
Copy link
Member

Disasm commented Jan 8, 2020

Maybe #[inline(always)] would be great for all the methods. They are called once anyway.

@therealprof
Copy link
Contributor

Maybe #[inline(always)] would be great for all the methods. They are called once anyway.

I like the ability to see how much binary size is attributed to those functions, also it's quite handy to set breakpoints on them. I'd really only force-inline them if there's a universal and substantial code size improvement.

@almindor
Copy link

almindor commented Jan 8, 2020

Maybe #[inline(always)] would be great for all the methods. They are called once anyway.

I like the ability to see how much binary size is attributed to those functions, also it's quite handy to set breakpoints on them. I'd really only force-inline them if there's a universal and substantial code size improvement.

We could introduce something like:

#[cfg_attr(feature = "force_inline", inline(always))]

@jonas-schievink
Copy link
Contributor

Note that #[inline] does not affect the public API, and additional Cargo features can always be added after 1.0 too.

@jonas-schievink jonas-schievink self-assigned this Jan 24, 2020
This was referenced Jan 24, 2020
bors bot added a commit that referenced this issue Jan 27, 2020
11: Some work towards 1.0 r=adamgreig a=jonas-schievink

Part of #9

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
@jonas-schievink jonas-schievink removed their assignment Jan 27, 2020
@adamgreig
Copy link
Member

re: MSRV, I have checked and r0 builds on 1.31.0 but not 1.30.0 (since it specifies edition=2018), so our current minimum possible MSRV is 1.31.0.

@adamgreig
Copy link
Member

@jamesmunns mentioned we might want to update the author field in Cargo.toml too.

@jonas-schievink
Copy link
Contributor

This is done 🎉

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

No branches or pull requests

6 participants