Crates.io | bookcase_alloc_macros |
lib.rs | bookcase_alloc_macros |
version | 2.0.0 |
source | src |
created_at | 2022-12-05 19:26:38.402801 |
updated_at | 2022-12-09 15:30:01.660734 |
description | Companion procedural macro crate for bookcase_alloc |
homepage | |
repository | https://github.com/Wopple/bookcase-rs |
max_upload_size | |
id | 730555 |
size | 8,456 |
I wanted to learn arenas, so I implemented my own. Then I noticed the existing arena crates were not to my liking.
Experimental, do not use unless you are a 🤡.
Notebooks start out blank. A person can write into a notebook. Depending on if they use pencil or pen, they may or may not be able to erase their notes. A person can pass a notebook to another person. Any person can write in the notebook, but only one at a time. Any number of people can read from a notebook at the same time.
This analogy is not perfect, but it's way better than what 'arena' has to offer! 😁
In rough priority order:
Personal*Notebook: Send
)Public*Notebook: Send + Sync
, very unsafe)Pen
)*MultiNotebook: Notebook
)*MonoNotebook<T>: TypedNotebook<T>
)*MultiNotebook: Allocator
(requires nightly)SizeStrategy
)GrowthStrategy
)alloc*() -> &mut T
)new*() -> Handle<T>
)Conclusion: SemVer is 🐍🛢
Unfortunately, cargo is tied to SemVer. Fortunately, SemVer is versioned. This means I can create my
own version of SemVer! 😈 Call it SemVer Maggie.1.0
. Here's how it works:
Assume all versions are breaking.
Strive to keep breaking changes to an absolute minimum.
Each dot separated number represents a release channel:
This channel is the only one suitable for production use.
This channel is for collecting well baked ideas that are preparing for stabilization.
This channel is the wild west where all bets are off and clown behavior is the norm.
stable.beta.experimental
experimental > 0
, otherwise...beta > 0
, otherwise...stable > 0
, otherwise...Therefore all stable releases are a bump to the "major" version suggesting to the downstream
developer they should consider The Ironclad Rule even if they are unfamiliar
with SemVer Maggie.1.0
.
=1.0.0
- stable v1
=1.2.0
- beta v2
based off stable v1
=1.2.3
- experimental v3
based off beta v2
based off stable v1
=2.0.1
- experimental v1
based off stable v2
=0.0.0
- invalidbookcase_alloc = "^1"
!Then get accustomed to compiler errors. A version within a release channel will only compile with
its respective feature enabled. The default feature is of course stable
. Enabling more than one
will also fail to compile. This is to prevent accidental use of beta and experimental channels in
production user code.
Maggie is my pet 🐷. She sucks at first, but you will eventually grow to love her.
bookcase_alloc_macros
is itself required to enforce the rules of SemVer Maggie.1.0
. As such, it
will only have a stable release channel.
I created a discord channel. As of this writing it has a population of me. Read the Goals, Concessions, and Progress sections for ideas on what to work on, and speak with me about how to make changes I am likely to accept. You can also just ask questions and give me feedback: feature requests, tell me my code is terrible or that I'm being too edgy. All feedback is welcome!