Comments (10)
I posted a PR for a 1.0.0 release in #175
I'd like to publish this as soon as possible, because lack of MaybeUninit
in existing releases is UB waiting to happen, and is already impacting downstream projects that run MIRI tests. We can release a 2.0 version next year or whenever const generics are ready.
from rust-smallvec.
Many of the unstable Rust features seem unlikely to stabilize any time soon. I think we should consider making a 1.0 release in the near future (sometime this year) which would include everything that is stable now (or in the very near future), and then make a 2.0 release much later (probably 2 or more years from now) with features that stabilize later.
The following would be delayed until 2.0 or later:
- const generics
- custom allocators
- specialization
The following might be ready in time for 1.0:
- MaybeUninit
- liballoc
- union
It might be worth waiting until MaybeUninit is stabilized, since that fixes a potentially critical soundness issue. Alternately we could use build-time rustc version detection to conditionally use MaybeUninit, but this would increase code complexity and we would need to live with it for potentially a long time.
from rust-smallvec.
I really hope that v1.0 version will use const generics. Yes, stabilization is unlikely to happen in the near future (6-12 months), but at least it's on horizon, which can not be said about specialization.
from rust-smallvec.
Regarding specialization, I can see how the From
implementation can work out, but wouldn't Extend
and insert_many
violate coherence rules?
from rust-smallvec.
Specializing these would require adding an intermediate trait with a default impl and specialized impls, like libstd's impl Extend for Vec
.
from rust-smallvec.
Might I suggest adding an updated drain
to the list.
SmallVec::drain
was implemented in #26, but does not accept a range argument like Vec::drain
. At the time, RangeArgument
(now RangeBounds
) had not stabilized. RangeBounds
is now stable since Rust 1.28.
from rust-smallvec.
MaybeUninit
and alloc
are now stable. Do we want to update this issue?
from rust-smallvec.
There's a neat trick written up by @dtolnay to emulate specialization on stable. I haven't looked too deeply into how well that performs, but it's probably worth a shot trying to use it.
from rust-smallvec.
@mbrubeck thank you for putting work into this!
Seems like the issue can be closed and a new one, wishlist for 2.0, opened instead
from rust-smallvec.
Filed #183 to track 2.0 progress.
from rust-smallvec.
Related Issues (20)
- support drain_filter ? HOT 12
- Store arbitrary types on `[u8; N]`? HOT 1
- CI failures due to dev_dependencies failing to build in Rust 1.36.0
- Add a `borsh` feature to get Borsh traits implemented
- Is this library support parallel iterator? HOT 3
- Add from_const_with_len HOT 2
- Make the v2 branch the default branch HOT 9
- Add a string type built on top of `SmallVec<u8>`? HOT 1
- Copy types
- Make a pre-release for v2 branch on crates.io HOT 1
- v1: `cargo doc` fails on nightly with `feature = "const_generics"` HOT 1
- test_size fails on 32-bit.
- implement `get_size::GetSize` for `SmallVec`, so we can know how much memory we're using? HOT 9
- README example no longer compiles HOT 1
- `SmallVec::insert` is UB on large arguments HOT 3
- Unable to deserialize the non-owned structures HOT 1
- Missing safety documentation for `Array` trait HOT 2
- Segfault on iter().collect() (2.0.0-alpha-5) HOT 3
- Implement `std::error::Error` for `CollectionAllocErr` HOT 1
- Wishlist: `TryFrom<SmallVec<A>> for [T; N]`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-smallvec.