tamnd / tamnd/firepanda

P0. May the Mojo runtime be redistributed inside a wheel

Open
#197 0 comments 0 reactions 0 assignees View on GitHub
blocked packaging risk upstream
Dominant language
Mojo
Stars
1
Forks
0
PR merge metrics
PR metrics pending

Description

Specification: [`12-the-python-front-door-measured.md`](../blob/main/docs/specs/12-the-python-front-door-measured.md) section 2, and [`07-python-bindings.md`](../blob/main/docs/specs/07-python-bindings.md) section 2.

**May the Mojo runtime libraries be redistributed inside a wheel on PyPI?**

This is the one question in M3 that cannot be answered by writing code, and it is the only remaining part of the distribution problem that is open.

### What is already answered

The technical half. A built Mojo Python extension links `libKGENCompilerRTShared.dylib` and `libAsyncRTMojoBindings.dylib`, which pull in `libMSupportGlobals.dylib` and `libAsyncRTRuntimeGlobals.dylib`. Those four come to 2.72 MB and the extension is 170 KB, so a self contained set is 2.8 MB. The extension does not link libpython. One absolute rpath has to be rewritten to `@loader_path` and the four runtime libraries need no patching because they already resolve loader relative. The whole thing then imports and runs on a stock Homebrew CPython 3.14 started with `env -i` and a `PATH` of `/usr/bin:/bin`, which is an interpreter with no way to reach a Mojo toolchain.

So the answer to "can we" is yes and it costs 2.8 MB. This issue is about "may we".

### What changes depending on the answer

Nothing in the binding code. That is the reason this issue is no longer a hard gate on the milestone the way document 07 wrote it. What it gates is publication: the four dylibs either go inside the wheel or they do not, and if they do not then `pip install firepanda` cannot work standalone and the distribution strategy becomes a conda dependency, which fails the requirement at the top of document 07.

### What has to happen

Read the Modular licence terms that ship with the toolchain and the ones on their site, and where they do not say plainly, ask Modular and get the answer in writing. Record the answer, the date, the version it applies to and who said it, in the repository rather than in a chat log, because a licence answer that lives in somebody's memory is not an answer.

If the answer is no, ask the second question, which is whether it becomes yes under any arrangement: a redistribution grant, a different runtime build, a static link. A no to the first question is not automatically a no to the milestone.

### Exit

- [ ] A written answer from Modular, or an unambiguous clause quoted from the licence with a link and a version
- [ ] The answer committed to the repository, with the toolchain version it applies to
- [ ] If yes, a note in `docs/specs/12` recording it and the publication path unblocked
- [ ] If no, a decision recorded on which of the fallbacks the project takes, and document 07 section 2 rewritten around it

Contributor guide

Open the contributing guide

Research direction

Read section 2 of docs/specs/12-the-python-front-door-measured.md and docs/specs/07-python-bindings.md, then review the Modular licence terms that ship with the toolchain and those on Modular’s site. If they do not give an unambiguous answer, ask Modular for written guidance. Done means committing the answer, date, applicable toolchain version, and source to the repository, plus recording the publication path or fallback decision in the specified documents.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, release
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.