| Crates.io | polished_files |
| lib.rs | polished_files |
| version | 0.1.1 |
| created_at | 2025-06-10 23:50:11.463326+00 |
| updated_at | 2025-06-12 20:24:03.236391+00 |
| description | File loading and (future) filesystem abstraction for Polished OS, supporting UEFI and no_std environments. |
| homepage | |
| repository | https://codeberg.org/ofluffydev/polished |
| max_upload_size | |
| id | 1707866 |
| size | 13,704 |
This crate is part of Polished OS, an experimental operating system written in Rust. The files library provides file loading and (eventually) filesystem abstraction for use in UEFI bootloaders, kernels, or other system software where direct file access is required in a no_std environment.
The files library currently focuses on UEFI file loading, providing a minimal and ergonomic interface for reading files from the UEFI Simple File System protocol. It is designed to be modular, safe, and extensible for future filesystem and storage support.
The main entry point is the read_file function (enabled with the uefi feature):
let data = read_file("EFI/BOOT/hello.txt")?;
// Use `data` as needed
Steps performed:
CString16).FileSystem abstraction (from the uefi crate).Vec<u8>), returning the data or an error.This approach allows safe and convenient file loading in no_std UEFI environments, such as bootloaders or early kernel code.
uefi feature)no_std-compatible designAdd this crate as a dependency in your Cargo workspace. If you are building for UEFI, enable the uefi feature:
[dependencies]
polished_files = { path = "../files", features = ["uefi"] }
Unless otherwise noted, all code in this crate is licensed under the zlib License:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
See the LICENSE file for full details.
This library is actively developed as part of Polished OS. Feedback and contributions are welcome!