WebAssembly

מתוך ויקיפדיה, האנציקלופדיה החופשית
WebAssembly
פרדיגמות תכנות אימפרטיבי, תכנות מובנה, תכנות מונחה מחסנית עריכת הנתון בוויקינתונים
תאריך השקה 2015 עריכת הנתון בוויקינתונים
מתכנן World Wide Web Consortium עריכת הנתון בוויקינתונים
מפתח World Wide Web Consortium, חברת גוגל, מיקרוסופט, מוזילה, אפל עריכת הנתון בוויקינתונים
הושפעה על ידי Google Native Client, PNaCl
רישיון Apache License 2.0
סיומת wast, wasm עריכת הנתון בוויקינתונים
webassembly.org
לעריכה בוויקינתונים שמשמש מקור לחלק מהמידע בתבנית

WebAssembly או בקיצור Wasm הוא תקן פתוח המגדיר פורמט לקוד בינארי יביל (portable binary-code) לקובצי הרצה, יחד עם ייצוג טקסטואלי בשפת סף, והגדרות ממשקים שנועדו להקל על הרצת הקוד בסביבת הריצה המארחת.[1][2][3][4] המטרה העיקרית של WebAssembly היא לאפשר ביצועים גבוהים ביישומי רשת, אבל הפורמט נועד גם לשילוב בסביבות אחרות.[5][6]

היסטוריה[עריכת קוד מקור | עריכה]

שיטת השימוש ב-WebAssembly הומלצה על ידי World Wide Web Consortium ב-5 בדצמבר 2019,[7] לרוץ לצד HTML,CSS ו-JavaScript באופן מובנה בתוך דפדפנים.[8]

התקן מתוחזק על ידי W3C עם תמיכה של מוזילה, Microsoft, Google, ו-Apple.

פיתוח Wasm[עריכת קוד מקור | עריכה]

על מנת ליצור Wasm לדפדפנים, מפתחים יכולים להשתמש ב-Emscripten SDK כדי להדר קוד C++ (או כל שפה אחרת נתמכת LLVM כגון D או Rust) לקובץ בינארי שירוץ בארגז חול בו JavaScript רץ.[13] Emscripten מאגד כמה סביבות ממשקים נפוצים כמו WebGL. אין גישה ישירה ל-DOM; עם זאת, אפשר ליצור "פונקציות פרוקסי" לשם כך, למשל דרך stdweb,[14] web_sys,[15] ו-js_sys‏.[16] בעת שימוש בשפת Rust.

קישורים חיצוניים[עריכת קוד מקור | עריכה]

ויקישיתוף מדיה וקבצים בנושא WebAssembly בוויקישיתוף

הערות שוליים[עריכת קוד מקור | עריכה]

  1. ^ "Introduction — WebAssembly 1.0". webassembly.github.io. נבדק ב-18 ביוני 2019. WebAssembly is an open standard... {{cite web}}: (עזרה)
  2. ^ "Introduction — WebAssembly 1.0". webassembly.github.io. נבדק ב-18 ביוני 2019. WebAssembly is a ... code format {{cite web}}: (עזרה)
  3. ^ "Conventions — WebAssembly 1.0". webassembly.github.io. נבדק ב-17 במאי 2019. WebAssembly is a programming language that has multiple concrete representations (its binary format and the text format). Both map to a common structure. {{cite web}}: (עזרה)
  4. ^ "Introduction — WebAssembly 1.0". webassembly.github.io. נבדק ב-18 ביוני 2019. ... this specification is complemented by additional documents defining interfaces to specific embedding environments such as the Web. These will each define a WebAssembly application programming interface (API) suitable for a given environment. {{cite web}}: (עזרה)
  5. ^ "WebAssembly Specification Release 1.0 (Draft, last updated Apr 16, 2019): Introduction". webassembly.org. נבדק ב-6 במאי 2019. Its main goal is to enable high performance applications on the Web, but it does not make any Web-specific assumptions or provide Web-specific features, so it can be employed in other environments as well. {{cite web}}: (עזרה)
  6. ^ Haas, Andreas; Rossberg, Andreas; Schuff, Derek L.; Titzer, Ben L.; Holman, Michael; Gohman, Dan; Wagner, Luke; Zakai, Alon; Bastien, JF (14 ביוני 2017). "Bringing the Web Up to Speed with WebAssembly". SIGPLAN Notices. 52 (6): 185–200. doi:10.1145/3140587.3062363. ISSN 0362-1340. While the Web is the primary motivation for WebAssembly, nothing in its design depends on the Web or a JavaScript environment. It is an open standard specifically designed for embedding in multiple contexts, and we expect that stand-alone implementations will become available in the future. {{cite journal}}: (עזרה)
  7. ^ World Wide Web Consortium. "WebAssembly Core Specification". World Wide Web Consortium (W3). נבדק ב-9 בדצמבר 2019. {{cite web}}: (עזרה)
  8. ^ Couriol, Bruno. "WebAssembly 1.0 Becomes a W3C Recommendation and the Fourth Language to Run Natively in Browsers". infoq.com. נבדק ב-9 בדצמבר 2019. {{cite web}}: (עזרה)
  9. ^ "Developer's Guide - WebAssembly". webassembly.org. נבדק ב-10 ביוני 2019. {{cite web}}: (עזרה)
  10. ^ "Compiling a New C/C++ Module to WebAssembly". MDN Web Docs (באנגלית). נבדק ב-10 ביוני 2019. {{cite web}}: (עזרה)
  11. ^ "Building to WebAssembly — Emscripten 1.38.33 documentation". emscripten.org. נבדק ב-10 ביוני 2019. {{cite web}}: (עזרה)
  12. ^ "Emscripting a C library to Wasm | Web". Google Developers (באנגלית). נבדק ב-10 ביוני 2019. {{cite web}}: (עזרה)
  13. ^ According to official documentation the Emscripten SDK may be used to create .wasm files which then may be executed in web browser.[9][10][11] Even though Emscripten can consume various languages when using Clang some problems may arise.[12]
  14. ^ "stdweb - Rust". docs.rs. נבדק ב-5 ביוני 2019. The goal of this crate is to provide Rust bindings to the Web APIs and to allow a high degree of interoperability between Rust and JavaScript. {{cite web}}: (עזרה)
  15. ^ "web_sys - Rust". docs.rs. נבדק ב-5 ביוני 2019. Raw API bindings for Web APIs. This is a procedurally generated crate from browser WebIDL which provides a binding to all APIs that browser provide on the web. {{cite web}}: (עזרה)
  16. ^ "js_sys- Rust". docs.rs. נבדק ב-5 ביוני 2019. Bindings to JavaScript's standard, built-in objects, including their methods and properties. {{cite web}}: (עזרה)