![]() | |
פרדיגמות |
תכנות אימפרטיבי, תכנות מובנה, תכנות מונחה מחסנית ![]() |
---|---|
תאריך השקה |
2015 ![]() |
מתכנן |
World Wide Web Consortium ![]() |
מפתח |
World Wide Web Consortium, חברת גוגל, מיקרוסופט, מוזילה, אפל ![]() |
הושפעה על ידי | Google Native Client, PNaCl |
רישיון | Apache License 2.0 |
סיומת |
wast, wasm ![]() |
webassembly | |
![]() ![]() |
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 לדפדפנים, מפתחים יכולים להשתמש ב-Emscripten SDK כדי להדר קוד C++ (או כל שפה אחרת נתמכת LLVM כגון D או Rust) לקובץ בינארי שירוץ בארגז חול בו JavaScript רץ.[13] Emscripten מאגד כמה סביבות ממשקים נפוצים כמו WebGL. אין גישה ישירה ל-DOM; עם זאת, אפשר ליצור "פונקציות פרוקסי" לשם כך, למשל דרך stdweb,[14] web_sys,[15] ו-js_sys.[16] בעת שימוש בשפת Rust.
WebAssembly is an open standard...
{{cite web}}
: (עזרה)
WebAssembly is a ... code format
{{cite web}}
: (עזרה)
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}}
: (עזרה)
... 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}}
: (עזרה)
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}}
: (עזרה)
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}}
: (עזרה)
{{cite web}}
: (עזרה)
{{cite web}}
: (עזרה)
{{cite web}}
: (עזרה)
{{cite web}}
: (עזרה)
{{cite web}}
: (עזרה)
{{cite web}}
: (עזרה)
.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]
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}}
: (עזרה)
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}}
: (עזרה)
Bindings to JavaScript's standard, built-in objects, including their methods and properties.
{{cite web}}
: (עזרה)