Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 25, 2025

The object file output is more efficient way of embedding and has been recommended via a warning since #16050 (early 2022).

With this simplification the file packager now has essentially two output modes:

  1. Preloading via JS
  2. Embedding via and object file

The object file output is more efficient way of embedding and has been
recommended via a warning since emscripten-core#16050 (early 2022).

With this simplification the file packager now has essentially two
output modes:

1. Preloading via JS
2. Embedding via and object file
@sbc100 sbc100 requested a review from kripken August 25, 2025 20:50
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Please add a changelog mention.

diagnostics.warn('support for using --preload and --embed in the same command is scheduled '
'for deprecation. If you need this feature please comment at '
'https://github.com/emscripten-core/emscripten/issues/24803')
diagnostics.error('--preload and --embed now now mutually exclusive (See https://github.com/emscripten-core/emscripten/issues/24803')
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
diagnostics.error('--preload and --embed now now mutually exclusive (See https://github.com/emscripten-core/emscripten/issues/24803')
diagnostics.error('--preload and --embed are mutually exclusive (See https://github.com/emscripten-core/emscripten/issues/24803')

Copy link
Member

Choose a reason for hiding this comment

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

(even a single "now" seems unneeded to me - we can just state the current rules, not a change in them)

diagnostics.error('--preload and --embed now now mutually exclusive (See https://github.com/emscripten-core/emscripten/issues/24803')

if options.has_embedded and not options.obj_output:
diagnostics.error('--obj-output is now required when using --embed. This outputs an object file for linking directly into your application is more efficient than the old JS encoding')
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
diagnostics.error('--obj-output is now required when using --embed. This outputs an object file for linking directly into your application is more efficient than the old JS encoding')
diagnostics.error('--obj-output is required when using --embed. This outputs an object file for linking directly into your application which is more efficient than the old JS encoding')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants