external-memory-tools

Crates.ioexternal-memory-tools
lib.rsexternal-memory-tools
version0.1.1
sourcesrc
created_at2024-01-17 09:03:04.683521
updated_at2024-02-09 19:38:01.026755
descriptionHAL to keep data in memory that could not be directly mapped to RAM
homepagehttps://github.com/Alzymologist/external-memory-tools
repositoryhttps://github.com/Alzymologist/external-memory-tools
max_upload_size
id1102626
size43,473
(Slesarew)

documentation

https://docs.rs/external-memory-tools/

README

External memory tools

This is a tiny collections of tools useful to address memory that is not mapped directly into RAM. Do not use it unless you know exactly what you are doing, the cases where this is needed are very limited and mostly related to very special baremetal systems.

Brief explanation

Rust allows neat memory allocations on no-std systems with the use of allocator abstraction; however, all normal tools assume that the memory that is addressed by that allocator could be low-level mapped into some address space. In some rare cases this is not possible (for example, in security vaults mapping arbitrary memory would present a direct breach to system security model).

So if you happen to work with one of those systems and you find yourself repeating the same patterns over and over again - use this crate.

Usage

Implement needed buffer access operations on your target memory and enjoy!

To use this crate with regular memory (for simpler cross platformness), just use () as External Memory - feature is implemented there. Unfortunately, you would still have to include () as parameter in every affected function call.

Development

Currently only read operations are supported; if you decide to contribute and add more features like writable and read-writeable buffers, please start hiding those under feature flags to keep things lean and safe.

Commit count: 0

cargo fmt