Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ See docs/process.md for more on how version tagging works.

4.0.21 (in development)
-----------------------
- The `-sPROXY_TO_WORKER` setting (along with the corresponding
`--proxy-to-worker` flag) was removed due to lack of usage. If you were
depending on this feature but missed the PSA, please let us know about your
use case. (#25645, #25440)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use case. (#25645, #25440)
use case. See also the PROXY_TO_PTHREAD and ENVIRONMENT=worker
options, which might be useful replacements. (#25645, #25440)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe.. but they really are not direct replacements since you would need to do your own event proxying. Obviously we can keep adding more details to this changelog entry but really I think the github issues is the right place to go into more details.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.


4.0.20 - 11/18/25
-----------------
Expand Down
4 changes: 0 additions & 4 deletions site/source/docs/api_reference/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ Other methods

.. note:: Sanitizers or source map is currently not supported if overriding WebAssembly instantiation with Module.instantiateWasm. Providing Module.instantiateWasm when source map or sanitizer is enabled can prevent WebAssembly instantiation from finishing.

.. js:function:: Module.onCustomMessage

When compiled with ``PROXY_TO_WORKER = 1`` (see `settings.js <https://github.com/emscripten-core/emscripten/blob/main/src/settings.js>`_), this callback (which should be implemented on both the client and worker's ``Module`` object) allows sending custom messages and data between the web worker and the main thread (using the ``postCustomMessage`` function defined in `proxyClient.js <https://github.com/emscripten-core/emscripten/blob/main/src/proxyClient.js>`_ and `proxyWorker.js <https://github.com/emscripten-core/emscripten/blob/main/src/proxyWorker.js>`_).

.. js:function:: Module.fetchSettings

Override the default settings object used when fetching the Wasm module from
Expand Down
1 change: 0 additions & 1 deletion site/source/docs/api_reference/wasm_workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ The following build options are not supported at the moment with Wasm Workers:

- -sSINGLE_FILE
- Dynamic linking (-sLINKABLE, -sMAIN_MODULE, -sSIDE_MODULE)
- -sPROXY_TO_WORKER
- -sPROXY_TO_PTHREAD

Example Code
Expand Down
28 changes: 1 addition & 27 deletions site/source/docs/tools_reference/settings_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1683,31 +1683,6 @@ in a worker. See emscripten.h

Default value: false

.. _proxy_to_worker:

PROXY_TO_WORKER
===============

If set to 1, we build the project into a js file that will run in a worker,
and generate an html file that proxies input and output to/from it.

.. note:: This setting is deprecated

Default value: false

.. _proxy_to_worker_filename:

PROXY_TO_WORKER_FILENAME
========================

If set, the script file name the main thread loads. Useful if your project
doesn't run the main emscripten- generated script immediately but does some
setup before

.. note:: This setting is deprecated

Default value: ''

.. _proxy_to_pthread:

PROXY_TO_PTHREAD
Expand Down Expand Up @@ -3431,8 +3406,6 @@ the these settings please open a bug (or reply to one of the existing bugs).
- ``ASYNCIFY_EXPORTS``: please use JSPI_EXPORTS instead
- ``LINKABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)
- ``RELOCATABLE``: under consideration for removal (https://github.com/emscripten-core/emscripten/issues/25262)
- ``PROXY_TO_WORKER``: under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)
- ``PROXY_TO_WORKER_FILENAME``: under consideration for removal (See https://github.com/emscripten-core/emscripten/issues/25440)

.. _legacy-settings:

Expand Down Expand Up @@ -3518,3 +3491,4 @@ for backwards compatbility with older versions:
- ``USE_OFFSET_COVERTER``: No longer supported, not needed with modern v8 versions (Valid values: [0])
- ``ASYNCIFY_LAZY_LOAD_CODE``: No longer supported (Valid values: [0])
- ``USE_WEBGPU``: No longer supported; replaced by --use-port=emdawnwebgpu, which implements a newer (but incompatible) version of webgpu.h - see tools/ports/emdawnwebgpu.py (Valid values: [0])
- ``PROXY_TO_WORKER``: No longer supported (Valid values: [0])
4 changes: 0 additions & 4 deletions src/lib/libegl.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,6 @@ var LibraryEGL = {
eglSwapBuffers__deps: ['$GLctx'],
eglSwapBuffers__proxy: 'sync',
eglSwapBuffers: (dpy, surface) => {
#if PROXY_TO_WORKER
if (Browser.doSwapBuffers) Browser.doSwapBuffers();
#endif

if (!EGL.defaultDisplayInitialized) {
EGL.setErrorCode(0x3001 /* EGL_NOT_INITIALIZED */);
} else if (!GLctx) {
Expand Down
61 changes: 0 additions & 61 deletions src/lib/libidbstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,67 +144,6 @@ var LibraryIDBStore = {
wakeUp();
});
}),
// extra worker methods - proxied
emscripten_idb_load_blob__async: true,
emscripten_idb_load_blob: (db, id, pblob, perror) => Asyncify.handleSleep((wakeUp) => {
#if ASSERTIONS
assert(!IDBStore.pending);
#endif
IDBStore.pending = (msg) => {
IDBStore.pending = null;
var blob = msg.blob;
if (!blob) {
{{{ makeSetValue('perror', 0, '1', 'i32') }}};
wakeUp();
return;
}
#if ASSERTIONS
assert(blob instanceof Blob);
#endif
var blobId = IDBStore.blobs.length;
IDBStore.blobs.push(blob);
{{{ makeSetValue('pblob', 0, 'blobId', 'i32') }}};
wakeUp();
};
postMessage({
target: 'IDBStore',
method: 'loadBlob',
db: UTF8ToString(db),
id: UTF8ToString(id)
});
}),
emscripten_idb_store_blob__async: true,
emscripten_idb_store_blob: (db, id, ptr, num, perror) => Asyncify.handleSleep((wakeUp) => {
#if ASSERTIONS
assert(!IDBStore.pending);
#endif
IDBStore.pending = (msg) => {
IDBStore.pending = null;
{{{ makeSetValue('perror', 0, '!!msg.error', 'i32') }}};
wakeUp();
};
postMessage({
target: 'IDBStore',
method: 'storeBlob',
db: UTF8ToString(db),
id: UTF8ToString(id),
blob: new Blob([new Uint8Array(HEAPU8.subarray(ptr, ptr+num))])
});
}),
emscripten_idb_read_from_blob: (blobId, start, num, buffer) => {
var blob = IDBStore.blobs[blobId];
if (!blob) return 1;
if (start+num > blob.size) return 2;
var byteArray = (new FileReaderSync()).readAsArrayBuffer(blob.slice(start, start+num));
HEAPU8.set(new Uint8Array(byteArray), buffer);
return 0;
},
emscripten_idb_free_blob: (blobId) => {
#if ASSERTIONS
assert(IDBStore.blobs[blobId]);
#endif
IDBStore.blobs[blobId] = null;
},
#else
emscripten_idb_load: (db, id, pbuffer, pnum, perror) => {
abort('Please compile your program with async support in order to use synchronous operations like emscripten_idb_load, etc.');
Expand Down
4 changes: 0 additions & 4 deletions src/lib/libsigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,8 @@ sigs = {
emscripten_idb_clear__sig: 'vpp',
emscripten_idb_delete__sig: 'vppp',
emscripten_idb_exists__sig: 'vpppp',
emscripten_idb_free_blob__sig: 'vi',
emscripten_idb_load__sig: 'vppppp',
emscripten_idb_load_blob__sig: 'vpppp',
emscripten_idb_read_from_blob__sig: 'viiip',
emscripten_idb_store__sig: 'vpppip',
emscripten_idb_store_blob__sig: 'vpppip',
emscripten_is_webgl_context_lost__sig: 'ip',
emscripten_lock_async_acquire__sig: 'vpppd',
emscripten_lock_orientation__sig: 'ii',
Expand Down
3 changes: 0 additions & 3 deletions src/lib/libwasm_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#if RELOCATABLE || MAIN_MODULE
#error "dynamic linking is not supported with -sWASM_WORKERS"
#endif
#if PROXY_TO_WORKER
#error "-sPROXY_TO_WORKER is not supported with -sWASM_WORKERS"
#endif
#if WASM2JS && MODULARIZE
#error "-sWASM=0 + -sMODULARIZE + -sWASM_WORKERS is not supported"
#endif
Expand Down
7 changes: 0 additions & 7 deletions src/postamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@

// === Auto-generated postamble setup entry stuff ===

#if PROXY_TO_WORKER
if (ENVIRONMENT_IS_WORKER) {
#include "webGLWorker.js"
#include "proxyWorker.js"
}
#endif

#if LOAD_SOURCE_MAP
#include "source_map_support.js"
#endif
Expand Down
Loading