Hi Hannes, It is understandable that Chromium drives v8 development, but IMO quite a few of the decisions for V8 are taken ignoring the rests of its users (the embedders as the documentation calls us).
We have been embedding V8 since 6.4 and more than 6 years. This message has been brewing for the last 3-4 years, but I guess now is as good as ever to share my observations of where V8 is going as a whole. And they are that V8 is becoming more and more unfriendly to the embedders. Some might say - hostile. This is bad for us - the embedders and this is bad for the whole JavaScript community. V8 is state of the art VM, probably the best currently available, and it becomes less and less usable for everything outside of Chromium. This means that eventually we'll have to settle for simpler, less efficient VMs, or use old - slower and insecure V8 versions or invest a lot of resources and create new JavaScript virtual machines. A few examples: 1. The component build with MSVC has been broken (and fixed) quite a few times for the last 3-4 years. 2. The component build using `clang-cl` is not really compatible with MSVC, due to the Zc:dllExportInlines- flag https://source.chromium.org/chromium/chromium/src/+/main:build/config/win/BUILD.gn;l=91-105; and https://clang.llvm.org/docs/UsersManual.html#the-zc-dllexportinlines-option . Last time we tried removing the flag v8 didn't build. 3. There are `std::vector`, `std::shared_pointer ` and `std::string` in the public APIs - forcing the embedded the use the same C++ STL (and lots of flags) as V8. Also uses the default allocators, which creates problems for projects where plain allocations are frowned upon. 4. The tracing garbage collection for C++ objects now requires for the object to be allocated in a heap managed by v8. The embedder has to either deal with the circular references and leaks somehow or actually let v8 allocate his objects. Probably one can link with the static clang v8 libraries, but then you have to build with the same standard library and compile with the same flags as V8. Example - V8 default configuration for Debug turns off iterator debugging, but that might be useful for the embedder code. Again - iterator debugging can be enabled for V8, but at the cost for slower performance for code that I don't really expect to hit issues in. None of these are new, MSVC has been practically unsupported for years and embedders have been maintaining their own forks. But with the complete removal these forks will become more and more expensive to maintain, until embedders just give up and move to other JavaScript runtimes. Dimitar On Tuesday, June 18, 2024 at 10:41:02 AM UTC+3 jc_m...@emailplus.org wrote: > Hi Hannes, > > Just a clarification: Does that mean only MSVC the compiler isn't > supported anymore, but the Microsoft C++ Standard Library still works [1]? > As you said, clang-cl is ABI compatible with MSVC, so I don't care which > compiler is used to compiled v8, as long as I can link v8 with other code. > > It's not always possible to use libc++ on Windows. In my case it's the > precompiled Qt (possibly Qt works with libc++ on Windows, but I think it's > unsupported). Mixing two huge libraries which require different C++ > standard libraries wouldn't be fun. Additionally, I use closed source SDK's > which mandate the Microsoft C++ standard library. I probably can't convince > you if you want to support only libc++ on Windows, but I hope the Microsoft > standard library is still supported so that v8 can be used in a standard > Windows executable (fingers crossed). > > Cheers, > Jean-Claude > > [1]: > https://learn.microsoft.com/en-us/cpp/standard-library/cpp-standard-library-overview?view=msvc-170 > > On Tue, Jun 18, 2024, at 8:16 AM, 'Hannes Payer' via v8-users wrote: > > Hi all, > > We acknowledge that this is a change for everybody who is using MSVC. > However there is a solution which hopefully works for many projects: > clang-cl produces ABI-compatible output to MSVC. You can build v8 with > clang-cl and link it to the code which is built with MSVC. The MSVC > installer includes clang-cl as an install option. > > Cheers, > Hannes > > On Mon, Jun 17, 2024 at 9:27 PM Ben Ernst <boi...@gmail.com> wrote: > > Ouch! We do use V8 on a live project compiled with MSVC. Thought it was > worth throwing a comment out there, although I'm sure this isn't a decision > that was taken lightly. > Cheers, > Ben > > > > > > On Mon, 17 Jun 2024 at 11:58, Hannes Payer <hpa...@chromium.org> wrote: > > Hi all, > > V8 will follow Chromium's lead > <https://groups.google.com/a/chromium.org/g/chromium-dev/c/fuVUxe1q6EA> > and will discontinue support for MSVC. To give projects time to adjust, we > will stop support after V8 version 13.0 in September 2024. After that, we > will remove the infrastructure bots and MSVC compatibility hacks in the > code base. > > Cheers, > Hannes > > > -- > -- > v8-dev mailing list > v8-...@googlegroups.com > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-dev+un...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/CANaZRYwBjN3wR7MJEdk-fmkNPHWzJFd1RU1iC3SBA32MnD-uoA%40mail.gmail.com > > <https://groups.google.com/d/msgid/v8-dev/CANaZRYwBjN3wR7MJEdk-fmkNPHWzJFd1RU1iC3SBA32MnD-uoA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > -- > -- > v8-users mailing list > v8-u...@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+u...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/CABexdQ4DUQrq74GTwtsnAhRO5WH1gN1Z9wZUr9J4aJLckWsEhw%40mail.gmail.com > > <https://groups.google.com/d/msgid/v8-users/CABexdQ4DUQrq74GTwtsnAhRO5WH1gN1Z9wZUr9J4aJLckWsEhw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > > -- > > > Hannes Payer | > V8 | > Google Germany GmbH | > Erika-Mann Str. 33, 80636 München > > Geschäftsführer: Paul Manicle, Liana Sebastian > > Registergericht und -nummer: Hamburg, HRB 86891 > > Sitz der Gesellschaft: Hamburg > > Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten > haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, > löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, > dass die E-Mail an die falsche Person gesendet wurde. > > > > This e-mail is confidential. If you received this communication by > mistake, please don't forward it to anyone else, please erase all copies > and attachments, and please let me know that it has gone to the wrong > person. > > > -- > -- > v8-users mailing list > v8-u...@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+u...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/CAKEgpyH%2B8HrOKLAxRW%2BU-S6d_n4NNOxw1e6uBGZqguqa%3D%3DS0Ww%40mail.gmail.com > > <https://groups.google.com/d/msgid/v8-users/CAKEgpyH%2B8HrOKLAxRW%2BU-S6d_n4NNOxw1e6uBGZqguqa%3D%3DS0Ww%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/8655e57a-b7a1-4d40-8515-b4a95504f474n%40googlegroups.com.