返回介绍

Tooling support

发布于 2020-02-22 17:50:08 字数 3311 浏览 1263 评论 0 收藏 0

Tooling for in-browser execution is often of uneven quality. WebAssembly aims at making it possible to support truly great tooling by exposing low-level capabilities instead of prescribing which tooling should be built. This enables:

  • Porting of existing and familiar tooling to WebAssembly;
  • Building new tooling that’s particularly well suited to WebAssembly.

WebAssembly development should be self-hosting, and not just as a cute hack but as enjoyable platform that developers actively seek out because the tools they want and need just work. Developers have high expectations, and meeting these expectations on tooling means WebAssembly has the features required to build rich applications for non-developers.

The tooling we expect to support includes:

  • Editors:
    • Editors such as vim and emacs should just work.
  • Compilers and language virtual machines:
    • Compilers for languages which can target WebAssembly (C/C++, Rust, Go, C#) should be able to run in WebAssembly themselves, emit a WebAssembly module that can then be executed.
    • Virtual machines for languages such as bash, Python, Ruby should work.
    • Virtual machines which use a just-in-time compiler (JavaScript VMs, luajit, pypy) should be able to support a new just-in-time backend for WebAssembly.
  • Debuggers:
    • Basic browser integration can be done through source map support.
    • Full integration for languages like C++ require more standardization effort on debugging information format as well as permissions for interrupting programs, inspecting their state, modifying their state.
    • Debug information is better delivered on-demand instead of built-in to a WebAssembly module.
  • Sanitizers for non-memory-safe languages: asan, tsan, msan, ubsan. Efficient support of sanitizers may require improving:
    • Trapping support;
    • Shadow stack techniques (often implemented through mmap’s MAP_FIXED).
  • Opt-in security enhancements for developers’ own code: developers targeting WebAssembly may want their own code to be sandboxed further than what WebAssembly implementations require to protect users.
  • Profilers:
    • Sample-based;
    • Instrumentation-based.
  • Process dump: local variables, call stack, heap, global variables, list of threads.
  • JavaScript+WebAssembly size optimization tool: huge WebAssembly+JavaScript mixed applications, WebAssembly calling to JavaScript libraries which communicate with the rest of the Web platform, need tooling to perform dead code stripping and global optimization across the API boundary.

In many cases, the tooling will be pure WebAssembly without any tool-specific support from WebAssembly. This won’t be possible for debugging, but should be entirely possible for sanitizers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文