Does dart2js --server-mode function properly?

1 view
Skip to first unread message

Joseph Tay

unread,
Apr 8, 2026, 4:52:02 AMApr 8
to Dart Compiler Developers
From what I understand, dart2js --server-mode is meant for Dart code compiled to JS that runs in a language runtime and not in a browser. However, it seems like the setting isn't really implemented properly to me, as the compiled code still has large sections in it that are meant to run on browsers which don't seem to be properly switched off when --server-mode is passed. Additionally I also found other problems with --server-mode, one being that the main function, on top of being compiled into JS that, again, is meant to run in browsers and wouldn't work properly in a runtime that isn't a browser, also seems to not be invoked correctly, passing an empty array instead of any arguments that the main function wants. With all these problems with --server-mode, I'd like to ask whether it has been implemented fully, or if the implementation is still incomplete. If it is the latter, I'd like to properly implement it, so could I ask that it remain as is for now and not be removed? I realize that this group is pretty much never checked now (With the last post from 2019!) but I didn't know where else to ask, so hopefully this post isn't going into the void.

Have a great day!

-Joseph

Bob Nystrom

unread,
Apr 13, 2026, 6:46:50 PM (14 days ago) Apr 13
to Joseph Tay, Dart Compiler Developers
Hi, Joseph, sorry for the delay.

I don't think this list gets used much these days and I'm not sure if any of the dart2js folks are paying attention to it. Your best bet is probably to file an issue at https://github.com/dart-lang/sdk/issues. When it gets triaged to the dart2js team, they should see it.

Cheers!

– bob

To unsubscribe from this group and stop receiving emails from it, send an email to compiler-dev...@dartlang.org.
Reply all
Reply to author
Forward
0 new messages