diff options
author | Damien George <damien@micropython.org> | 2022-03-04 10:52:35 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-12-23 13:04:54 +1100 |
commit | 50637ff239cb6a09294f49fe2d2534c2d7ae8b76 (patch) | |
tree | 0ae529c80982e0d9ecce6534065ae67a3dca4268 /py/qstr.c | |
parent | 4729a895046908414b239f02256ac3334d1b2c15 (diff) |
extmod/vfs_rom: Add VfsRom filesystem object.
This commit defines a new ROMFS filesystem for storing read-only files that
can be memory mapped, and a new VfsRom driver. Files opened from this
filesystem support the buffer protocol. This allows naturally getting the
memory-mapped address of the file using:
- memoryview(file)
- uctypes.addressof(file)
Furthermore, if these files are .mpy files then their content can be
referenced in-place when importing. Such imports take up a lot less RAM
than importing from a normal filesystem. This is essentially dynamically
frozen .mpy files, building on the revamped v6 .mpy file format.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/qstr.c')
0 files changed, 0 insertions, 0 deletions