sys memory-module-sys

Bindings to the MemoryModule library for loading libraries from memory on Windows

3 releases (breaking)

0.3.0 Mar 23, 2020
0.2.0 Mar 23, 2020
0.1.0 Feb 26, 2020

#183 in #windows

Download history 122/week @ 2020-12-25 89/week @ 2021-01-01 89/week @ 2021-01-08 150/week @ 2021-01-15 121/week @ 2021-01-22 110/week @ 2021-01-29 135/week @ 2021-02-05 204/week @ 2021-02-12 200/week @ 2021-02-19 377/week @ 2021-02-26 199/week @ 2021-03-05 195/week @ 2021-03-12 139/week @ 2021-03-19 191/week @ 2021-03-26 120/week @ 2021-04-02 280/week @ 2021-04-09

644 downloads per month
Used in pyembed

MPL-2.0 license


C 1K SLoC // 0.1% comments Rust 81 SLoC // 0.1% comments

Rust Bindings to Memory Module Library

This repository contains low-level Rust bindings to the library at https://github.com/fancycode/MemoryModule that facilitates loading Windows PE files from memory on Windows. i.e. it allows you to import a DLL/EXE from a &[u8] without requiring the library to be backed by a file.

The Rust library simply compiles the upstream library and declares extern "C" unsafe bindings to it. This being a -sys crate, that is all it will ever do: higher-level bindings would exist in a separate crate.


This crate is licensed under the same terms as the MemoryModule library, which is MPL 2.0.

The MemoryModule library is maintained by Joachim Bauch.


Load DLLs/EXEs from memory on Windows.

This crate declares a library interface to https://github.com/fancycode/MemoryModule.

The initial developer of the original code is Joachim Bauch. See the copyright in the vendored .c/.h files for a more detailed copyright notice.