{"id":121335,"date":"2025-01-14T09:46:13","date_gmt":"2025-01-14T07:46:13","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly"},"modified":"2025-01-14T09:46:13","modified_gmt":"2025-01-14T07:46:13","slug":"dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly","title":{"rendered":"Emscripten 4.0 is now available, a compiler from C\/C++ to WebAssembly","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>The release of Emscripten 4.0 has been published, allowing the compilation of code in C\/C++ and other languages that have frontends based on LLVM into a universal low-level intermediate WebAssembly code. The resulting output can be used for integration with JavaScript projects, running in web browsers, utilizing Node.js, or creating standalone cross-platform applications executed via a wasm runtime. The project code is licensed under the MIT license. The compiler uses developments from the LLVM project, and the Binaryen library is used for generating WebAssembly and optimization.    <\/p>\n<p>The primary goal of Emscripten is to create a tool that allows code to run on the Web regardless of the programming language in which it was originally written. The compiled applications can use calls to standard C and C++ libraries (libc, libcxx), C++ extensions, multithreading based on pthreads, POSIX APIs, and many multimedia libraries. API support is separately provided for integration with Web APIs and JavaScript code.    <\/p>\n<p>Emscripten supports the translation of SDL2 library output through Canvas and implements support for OpenGL and EGL via the WebGL API, enabling the conversion of graphical applications and games to WebAssembly (for example, there is a port of the Qt toolkit, and game engines such as Unreal Engine and Unity are supported, as well as the Bullet physics simulation engine).     <\/p>\n<p>In addition to compiling code in C\/C++, projects for running interpreters in browsers are being developed separately, <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/vps\/\"   title=\"of virtual machines\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"2133\">of virtual machines<\/a> for languages such as Lua, C#, Python, Ruby, and Perl. Moreover, it is possible to apply frontends to LLVM that are different from Clang, such as frontends for languages like Swift, Rust, D, and Fortran.      <\/p>\n<p>The assignment of version number 4.0 is related to changes that break compatibility at the ABI level (rebuilding a project in Emscripten 4.0 will require rebuilding object files and libraries compiled with previous versions of Emscripten). The main changes in Emscripten 4.0 are:  <\/p>\n<ul>\n<li class=\"l\"> The option &#171;-sWASM_LEAGCY_EXCEPTIONS&#187; has been added to choose between the old and new exception handling mechanisms. By default, the old mechanism continues to be used, as not all browsers have implemented the WebAssembly capabilities for the new exception handlers.\n<li class=\"l\"> The components compiler-rt, libcxx, libcxxabi, and libunwind have been updated to LLVM branch 19.\n<li class=\"l\"> The minimum supported version of the Safari browser in builds (setting MIN_SAFARI_VERSION) has been raised from 14.1 to 15.0, enabling several advanced WebAssembly features by default.\n<ul>\n<li class=\"l\"> The use of new instructions for converting float to int (nontrapping-fptoint) is enabled, which instead of generating an exception on overflow returns the minimum or maximum possible value (necessary for SIMD).\n<li class=\"l\"> The WASM_BIGINT option is enabled, where the BigInt type is used for exchanging 64-bit integer values between WebAssembly and JavaScript code.\n<li class=\"l\"> The BULK_MEMORY option is enabled, implementing C functions memcpy and memset using the WebAssembly instructions memory.copy and memory.fill.    <\/ul>\n<li class=\"l\"> Path normalization (PATH.normalize()) has been disabled in the PATH.basename() function, meaning that the call &#8216;PATH.basename(&#171;a\/.&#187;)&#8217; will now return &#171;.&#187; instead of &#171;a&#187;, and &#8216;PATH.basename(&#171;a\/b\/..&#187;)&#8217; will return &#171;..&#187; instead of &#171;a&#187;.\n<li class=\"l\"> When using the &#171;-sMODULARIZE&#187; option, factory functions that create and return instances of WebAssembly modules and objects for JavaScript are now marked as &#171;async&#187; when compiled in the WASM_ASYNC_COMPILATION mode, which is used by default.\n<li class=\"l\"> The ability to specify JavaScript libraries using the &#171;-lfoo.js&#187; option has been added. Unlike the &#171;&#8212;js-library&#187; option, the library search is performed in all paths specified through the &#171;-L&#187; option.\n<li class=\"l\"> When compiling in debug mode (-O0 or -sASSERTIONS), a debug variant of the malloc function with enabled assert checks is used by default, detecting errors such as double calls to the free() function.        <\/ul>\n<p>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=62553\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f Emscripten 4.0, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C\/C++ \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u044b \u043d\u0430 \u0431\u0430\u0437\u0435 LLVM, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 JavaScript-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Node.js \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 wasm runtime. \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-121335","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f Emscripten 4.0, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C\/C++ \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u044b \u043d\u0430 \u0431\u0430\u0437\u0435 LLVM, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0414\u043e\u0441\u0442\u0443\u043f\u0435\u043d Emscripten 4.0, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 C\/C++ \u0432 WebAssembly | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f Emscripten 4.0, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C\/C++ \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u044b \u043d\u0430 \u0431\u0430\u0437\u0435 LLVM, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-01-14T07:46:13+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-01-14T07:46:13+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Emscripten 4.0 is available, a compiler from C\/C++ to WebAssembly | ProHoster","description":"The release of the Emscripten 4.0 toolkit has been announced, allowing the compilation of code in C\/C++ and other languages with LLVM-based frontends into universal low-level WebAssembly intermediate code.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0414\u043e\u0441\u0442\u0443\u043f\u0435\u043d Emscripten 4.0, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 C\/C++ \u0432 WebAssembly | ProHoster","og:description":"\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432\u044b\u043f\u0443\u0441\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f Emscripten 4.0, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C\/C++ \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u044b \u043d\u0430 \u0431\u0430\u0437\u0435 LLVM, \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 WebAssembly.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/dostupen-emscripten-4-0-kompilyator-iz-c-c-v-webassembly","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2025-01-14T07:46:13+00:00","article:modified_time":"2025-01-14T07:46:13+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"121335","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-02-09 17:39:23","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2026-01-23 09:39:24","updated":"2026-02-09 17:39:23","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/121335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=121335"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/121335\/revisions"}],"predecessor-version":[{"id":159377,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/121335\/revisions\/159377"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=121335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=121335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=121335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}