Skip to content

[wasm] Host should separate arguments for engine, mono and application #88760

Description

@pavelsavara

Possible designs
A) use multiple -- to separate it
node --enable-source-maps main.js -- hello.dll --setenv=XXX=1 -- -fromCity=Prague to Ilona

--enable-source-maps is nodeJS engine flag
--setenv=XXX=1 is mono engine flag
-fromCity=Prague is application argument
to is application arg
Ilona is application arg

dotnet run --engine=node -- --enable-source-maps main.js -- hello.dll --setenv=XXX=1 -- -fromCity=Prague to Ilona

this assumes that main.js which is user will call .withRuntimeOptionsFromArguments() to consume it.

B) use well know pass-thru arguments

wasmtime run --env MONO_OPTIONS="values" dotnet.wasm

dotnet run --engine=wasmtime --engine-arg='--env MONO_OPTIONS="values"' dotnet.wasm

escaping becomes nasty.

Also, from #85674 (comment)
Perhaps there should be pass-thru argument like --host:xxx=yyyand--runtime:aaa=bbbbefore application -- ? As an alternative to multiple -- .

More details discussed here #70892

Activity

  1. added
    arch-wasm
    os-browser
    on Jul 12, 2023
  2. added this to the 8.0.0 milestone on Jul 12, 2023
  3. ghost added
    needs-area-label
    on Jul 12, 2023
  4. removed
    needs-area-label
    on Jul 14, 2023
  5. assigned and unassigned on Jul 25, 2023
  6. radical commented on Aug 14, 2023

    @radical
    Member

    Moving this to 9.0, so we can get an agreement on how this should be done, as it should be consistent with how dotnet run handles these kinda cases.

  7. modified the milestones: 8.0.0, 9.0.0 on Aug 14, 2023
  8. pavelsavara commented on Nov 20, 2023

    @pavelsavara
    MemberAuthor
  9. removed their assignment
    on Feb 27, 2024
  10. modified the milestones: 9.0.0, Future on Jul 4, 2024
  11. modified the milestones: Future, 12.0.0 on Jul 30, 2026
  12. self-assigned this
    on Jul 30, 2026
  13. added
    in-pr
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-System.Runtime.InteropServices.JavaScriptin-pros-browser

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions