Initial implementation of the global buffer arena (#270)

* [core] initial implementation of the global buffer arena

* [core] add license header to buffer arena

* [core] add module level docs to buffer arena

* [core] move license header where it belongs (to the top)

* [core] add docs for diagnostic fields and getters

* [core] add tests to buffer arena

* [core] apply rust fmt

* [core] remove allocated field from BufferArena

The information is redundant since it can be computed as free + in_use.

* [core] improve buffer arena tests

* [core] export buffer arena public symbols from core::env2

* [core] fix doc comment link to AsRef and AsMut

* [core] remove nightly cell-update feature

* [core] enable no_std for BufferArena and mirror thread_local interfacing

* [core] fix some obvious no_std mis-compilations

* [core] apply rustfmt

* [core] apply rustfmt #2

* [core] fix clippy warning in buffer_arena

* [core] fix typo

Co-Authored-By: Michael Müller <>

* [core] slightly improve get_buffer impl

Co-Authored-By: Michael Müller <>

* [core] slight improvements

* [core] rename LocalKey to GlobalBufferArena

* [core] fix no_std build
14 jobs for master
in 16 minutes and 4 seconds, using 0 compute credits, and was queued for 3 seconds