11 breaking releases

0.12.0 Dec 29, 2022
0.11.0 Nov 8, 2022
0.10.0 Jun 5, 2022
0.8.0 Oct 25, 2021
0.1.0 Apr 10, 2020

#541 in Data structures

Download history 1009/week @ 2024-01-05 875/week @ 2024-01-12 775/week @ 2024-01-19 862/week @ 2024-01-26 847/week @ 2024-02-02 856/week @ 2024-02-09 1202/week @ 2024-02-16 3482/week @ 2024-02-23 2532/week @ 2024-03-01 1532/week @ 2024-03-08 1614/week @ 2024-03-15 1891/week @ 2024-03-22 2077/week @ 2024-03-29 2370/week @ 2024-04-05 2407/week @ 2024-04-12 1818/week @ 2024-04-19

8,975 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

130KB
3K SLoC

About

This crate defines and implements a data format for storing resources useful to the execution of a Python interpreter. We call this data format Python packed resources. See the crate's documentation for more.

This crate is developed primarily for PyOxidizer. But it can be used outside the PyOxidizer project.

Getting Started

This crate defines a Rust library. There's nothing special about the library and it can be operated on like a typical Rust crate:

$ cargo build
$ cargo test
$ cargo doc

lib.rs:

Python Packed Resources

This crate defines and implements a data format for storing resources useful to the execution of a Python interpreter. We call this data format Python packed resources.

The idea is that a producer collects Python resources required by a Python interpreter - Python module source and bytecode, non-module resource files, extension modules, shared libraries, etc - attaches metadata to those resources (e.g. whether a Python module is also a package), and then serializes all of this out to a binary data structure.

Later, this data structure is parsed back into composite parts. e.g. to a mapping of Python module names and their respective data. This data structure is then consulted by a Python interpreter to e.g. power the module import mechanism.

This crate is developed primarily for PyOxidizer. But it can be used outside the PyOxidizer project. See the aforementioned docs for the canonical specification of this format.

Dependencies

~245KB