Rustic.Memory
0.4.0
See the version list below for details.
dotnet add package Rustic.Memory --version 0.4.0
NuGet\Install-Package Rustic.Memory -Version 0.4.0
<PackageReference Include="Rustic.Memory" Version="0.4.0" />
paket add Rustic.Memory --version 0.4.0
#r "nuget: Rustic.Memory, 0.4.0"
// Install Rustic.Memory as a Cake Addin #addin nuget:?package=Rustic.Memory&version=0.4.0 // Install Rustic.Memory as a Cake Tool #tool nuget:?package=Rustic.Memory&version=0.4.0
Rustic
Common
dotnet add package Rustic.Common
Namespace Rustic.Common
Definition | Description |
---|---|
ref struct StrBuilder |
ValueStringBuilder from ValueStringBuilder: a stack-based string-builder. |
static class ThrowHelper |
Centralized functionality related to validation and throwing exceptions. |
static class Arithmetic |
Collection of extension methods and utility functions related to integer arithmetic. Most functions are ported from bithacks |
Memory
dotnet add package Rustic.Memory
Namespace Rustic.Memory
Definition | Description |
---|---|
struct TinyVec |
Read-only list with a inline capacity of 4. Also see TinySpan |
readonly ref struct TinySpan |
Partially inlined immutable collection of function parameters. |
readonly ref struct BitSet |
Enables unaligned marking of bits in a memory area. |
readonly ref struct BitVec |
Partially inlined immutable collection of function parameters. |
Vector
Namespace Rustic.Memory.Vector
This package mainly contains the list and buffer implementations
Definition | Description |
---|---|
class Vec |
System.Collections.Generic.List -like implementation allowing by-ref access. |
ref struct RefVec |
Temporary array allocating from ArrayPool<T>.Default . |
that aim to optimize memory management, by
- returning
struct
s by-ref
or -readonly ref
on access, - optimizing for temporary array usage by providing implementations allowing allocation from a
ArrayPool<T>
, - and inlining tiny arrays.
IO
Namespace Rustic.Memory.IO
For constructing or writing sequences of data an array is often required. Therefore, a List<T>
has to be copied to the required layout, to circumvent this BufWriter
allows moving the reference of the internal array to user control safely.
Definition | Description |
---|---|
class BufWriter |
IBufferWriter similar to Vec . |
class PoolBufWriter |
IBufferWriter similar to PoolVec . |
var obj = [...]
PoolBufWriter<byte> writer = new();
Serializer.Serialize(writer, obj);
DoWork(writer.ToSpan(out byte[] poolArray));
ArrayPool<byte>.Return(poolArray);
-- or --
var obj = [...]
PoolBufWriter<byte> writer = new();
Serializer.Serialize(writer, obj);
return writer.ToArray(dispose: true);
Text
dotnet add package Rustic.Text
Namespace Rustic.Text
In addition to that the package provides the following non-allocating helpers for parsing text and more
Definition | Description |
---|---|
ref struct SplitIter |
Iterator slicing a sequence of elements into smaller sequences, by a set of separators. Analogous in function to string.Split |
ref struct Tokenizer |
Allows scanning and navigating a sequence of elements on a per-iteration basis. Inspired by Utf8JsonReader but much more generic. |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Rustic.Common (>= 0.4.0)
- System.Memory (>= 4.5.4)
-
.NETStandard 2.1
- Rustic.Common (>= 0.4.0)
- System.Memory (>= 4.5.4)
-
net5.0
- Rustic.Common (>= 0.4.0)
- System.Memory (>= 4.5.4)
-
net6.0
- Rustic.Common (>= 0.4.0)
- System.Memory (>= 4.5.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Rustic.Memory:
Package | Downloads |
---|---|
Rustic.Text
Types and extensions improving string access and formatting functionality. Formatter, SeqSplitIter, SplitIter, Tokenizer |
|
Rustic.Reflect
Il based delegate emitter and commonly used reflection utility. ILEmitter, ILReflect |
GitHub repositories
This package is not used by any popular GitHub repositories.
# Version 0.40
- Rename project root.
- Enforce horizontal separation between projects.
- Create `BitVec`.
# Version 0.30
## Major fixes
- Fixed bogus `ArrayPool` usage
- Fix `SplitIter` includes separator. Is not optional
- Change project structure and naming. Notably: `ValueList` → `RefVec`, `RefList` → `Vec`, `ParamSpan` → `TinySpan` and others.
## Minor fixes
- Remove bogus extension-method overloads.
- More & better documentation