Skip to content

Commit 499e0f6

Browse files
Update implementation details to be more accurate (#62)
1 parent 933b558 commit 499e0f6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ of the ELF binary so that the Linux operating system can locate the library when
114114

115115
`auditwheel-emscripten` is a variation of auditwheel that is specifically designed
116116
to work with Emscripten-generated WebAssembly (WASM) modules.
117-
It does not perform an audit on the wheel, as Emscripten does not guarantee compatibility between versions.
118-
Instead, it simply copies the required libraries into the wheel without modifying the module itself.
119-
It is up to the user to manually implement a way to locate these libraries at runtime.
117+
Like [`auditwheel`](https://github.com/pypa/auditwheel), it copies the required shared libraries into the wheel and patches the runtime
118+
search path of each WASM module so the dynamic linker can locate them at runtime.
119+
It does this by writing a `RUNTIME_PATH` entry (using `$ORIGIN`-relative paths) into the `dylink.0`
120+
custom section of each module, which is the Emscripten equivalent of the ELF RPATH.
121+
Pyodide's dynamic linker reads this section to resolve library locations.
122+
123+
Unlike `auditwheel` on Linux, `auditwheel-emscripten` does not enforce compatibility between
124+
Emscripten versions, since no stable ABI exists for Emscripten-compiled shared libraries.

0 commit comments

Comments
 (0)