mbox
mbox copied to clipboard
Questions
Hey, I've opened a few PRs against this repo because we intend to use it in the future in objc (see https://github.com/SSheldon/rust-objc/pull/72), and in my fork of that project.
So, I have a few questions regarding the code:
- Have you considered whether the unstable
#[may_dangle]is appropriate forMBox? - It is generally a good idea to add
#[inline]on smaller functions, especially on forwarding implementations, have you considered this? - The file structure is a bit unorthodox compared to most rust projects (mostly that test functions live outside a
#[cfg(test)] mod tests) - would you be open to PRs refactoring this?
And a few regarding the project itself:
- Would you be open to relicensing under a dual MIT / Apache 2.0 license?
- This crate is currently lacking the high quality documentation that
c_vechas, especially regarding examples; maybe consider making some of the tests as documentation examples? - If you want more widespread adoption (which I generally think this crate deserves), maybe consider opening a PR against
sdl2andhyperscan.
And do you know if it will be possible, when the relevant features stabilize, to create an Allocator such that MBox could just be type MBox<T> = Box<T, MallocAllocator>?
Regarding inlining, see https://std-dev-guide.rust-lang.org/code-considerations/performance/inline.html and https://nnethercote.github.io/perf-book/inlining.html