python / python/cpython

Emscripten settings in configure.ac are not embedding friendly

未關閉
#120,746 15 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

OS-emscripten type-bug
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Bug report

Bug description:

I would like to be able to opt out of certain Emscripten options since I am embedded CPython in a larger application. For example, the forced inclusion of the JS file system is breaking my builds since I use WASMFS in my system which isn't compatible with -lidbfs.js, -lnodefs.js, -lproxyfs.js, -lworkerfs.js. Moreover, I would like to customise the TOTAL_MEMORY option.

Perhaps these options can be on by default but placed behind a flag that can turn them off? For example, --enable-wasm-emscripten-jsfs? Alternatively, perhaps all these settings can be disabled unless one of node, browser, node-debug, browser-debug is set via --with_emscripten_target?

Right now, it seems my only option is to apply a patch to turn these settings off which should be unnecessary in my opinion. @hoodmane @vstinner what do you think?

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先閱讀 configure.ac 中 2340-2351 行附近的內容,以及現有的 --with_emscripten_target 處理邏輯。確定 Emscripten JavaScript 檔案系統選項和 TOTAL_MEMORY 目前是如何設定的,然後定義嵌入式建置如何選擇不使用或自訂它們。完成的標準是:無需維護修補程式即可控制所要求的設定。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, wasm
領域
build-system
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。