• 微头条

    让本地生活更美好

打开APP

使用 WebAssembly 在浏览器中运行 Clang 取得重大进展

2024-10-12 外星人S博士
使用 WebAssembly 在浏览器中运行 Clang 取得重大进展

Source: Slashdot

本周,获得 MIT 许可的 WebAssembly 运行时 Wasmer 宣布实现了“使任何软件能够在 WebAssembly 上运行的重大里程碑。最新发布的 Wasmer (4.4) 和 Wasmer JS SDK (0.8.0) 允许用户在任何支持 Wasmer 的环境中运行编译器前端 Clang,这样您可以轻松地在浏览器中从 C 程序编译到 WebAssembly,包括 JavaScript。

在测试中,Chrome、Safari 和 Firefox 的表现都非常出色。使用 Wasmer CLI,您无需复杂的工具链或安装程序即可轻松编译 C 代码,安装 Wasmer 后即刻启动。

此外,您可以直接从 JavaScript 编译 C 项目,预计在线 IDE 将开始采用该 SDK,允许用户在浏览器中编译和运行 C 程序。Wasmer 的 Clang 还能够自动使用 wasm-opt 进行文件优化。

这项技术的进步使得依赖于 LLVM 的任何项目都可以轻松编译为 WebAssembly,展望未来,期待用户们能创造出更多精彩的项目。

技术的进步往往为创意提供了新的土壤,这次 Wasmer 的成就又将催生多少新的可能性呢?

特别声明:本文及配图均为用户上传或者转载,本文仅代表作者个人观点和立场,不代表平台观点。其原创性以及文中陈述文字和内容未经本站证实, 对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本平台不作任何保证或承诺,请读者仅作参考, 并请自行核实相关内容。如发现稿件侵权,或作者不愿在本平台发布文章,请版权拥有者通知本平台处理。
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to info@microheadline.com
来源:https://developers.slashdot.org/story/24/10/12/0519256/running-clang-in-the-browser-using-webassembly?utm_source=rss1.0mainlinkanon&utm_medium=feed https://www.reddit.com/r/cpp/comments/7n4doh/clang_in_browser_wasm_producing_wasm/ https://www.reddit.com/r/rust/comments/7ngwye/heres_clang_running_in_the_browser_via_wasm/
更多阅读