WebAssembly
WebAssembly (ing-gú: WebAssembly; ū-tang-sî-á siá-tsò Wasm) uî ē-tàng tsip-hîng tîng-sū tīng-gī tsi̍t-tsióng ē-sái î-si̍t ê 2 tsìn-tsè tāi-bé kik-sik hām sio tuì-ìng ê bûn-pún kik-sik[2], í-ki̍p iōng-teh tshiok-tsìn tsit-luī tîng-sū kah i-ê siok-tsú khuân-kíng tsi-kan kau-hōo ê nńg-thé tsiap-kháu.[3][4][5][6]
Pian-têng hoān-hêng | kiat-kòo-huà ; thia̍p-thōng kiat-kòo ke-khì[1] |
---|---|
Nńg-thé siat-kè | W3C liân-bîng |
Têng-sek-goân | |
Siú-chhù hoat-hêng | 2017 nî 3 goe̍h |
OS | To̍k-li̍p teh pênn-tâi |
Nńg-thé siū-koân | Apache tsìng-tsiáu 2.0 |
Bûn-kiāⁿ khok-tián-miâ |
|
Bāng-chām |
webassembly |
Khé-hoat gí-giân | |
WebAssembly ê tsú-iàu bo̍k-piau sī teh bāng-ia̍h tíng-kuân khé-iōng ko sìng-lîng ìng-iōng tîng-sū, "M̄-kú WebAssembly bô-tsò jīm-hô ti̍k-tīng teh Web ê ká-siat hi̍k-tsiá thê-kiong ti̍k-tīng teh Web ê kong-lîng, in-tshú WebAssembly mā ē-tàng teh kî-thann khuân-kíng tang-tiong sú-iōng."[7]WebAssembly sī tsi̍t-ê khai-guân piau-tsún[8][9], i-ê bo̍k-piau tsú-iàu teh tsi-tshî jīm-hô tshau-tsok hē-thóng tíng-kuân ê jīm-hô gú-giân,[10] pīng-tshiánn teh si̍t-tsiān tang-tiong, sóo-ū siong liû-hîng ê gú-giân lóng tsì-tsió kū-iú it-tīng thîng-tōo ê tsi-tshî.
WebAssembly tī 2015-nî suan-pòo pīng-tī 2017-nî 3-gue̍h thâu-tsi̍t-pái huat-pòo, tī 2019-nî 12-gue̍h 5-ji̍t tsiânn-tsò World Wide Web liân-bîng thui-tsiàn[11][12][13]pīng tī 2021-nî hi̍k-tit ACM SIGPLAN ê pian-tîng gú-giân nńg-thtsióng.[14], W3C liân-bîng (W3C) teh Mozilla, Microsoft, Google, Apple, Fastly , Intel kah Red Hat ê kòng-hiàn tsi-hā uî-hōo tsit-ê piau-tsún .[15][16]
Kui-keh ti̍k-sik
siu-káiTsú-ki khuân-kíng
siu-káiTāi-bé piáu-sī
siu-káiC guân-tāi-bé | WebAssembly .wat bûn-pún kik-sik | WebAssembly .wasm 2 tsìn-tsè kik-sik |
---|---|---|
int factorial(int n) {
if (n == 0)
return 1;
else
return n * factorial(n-1);
}
|
(func (param i64) (result i64)
local.get 0
i64.eqz
if (result i64)
i64.const 1
else
local.get 0
local.get 0
i64.const 1
i64.sub
call 0
i64.mul
end)
|
00 61 73 6D 01 00 00 00
01 00 01 60 01 73 01 73 06
03 00 01 00 02
0A 00 01
00 00
20 00
50
04 7E
42 01
05
20 00
20 00
42 01
7D
10 00
7E
0B
0B 15 17
|
(module
(type $t0 (func (param i64) (result i64)))
(func $f0 (type $t0) (param $p0 i64) (result i64)
(if $I0 (result i64) ;; $I0 is an unused label name
(i64.eqz
(local.get $p0)) ;; the name $p0 is the same as 0 here
(then
(i64.const 1))
(else
(i64.mul
(local.get $p0)
(call $f0 ;; the name $f0 is the same as 0 here
(i64.sub
(local.get $p0)
(i64.const 1))))))))
Tsù-kái
siu-kái- ↑ "WebAssembly/design/Semantics.md". GitHub (ēng Eng-gí). 2021-02-23 khòaⁿ--ê.
WebAssembly code can be considered a structured stack machine; a machine where most computations use a stack of values, but control flow is expressed in structured constructs such as blocks, ifs, and loops. In practice, implementations need not maintain an actual value stack, nor actual data structures for control; they need only behave as if they did so.
- ↑ Mozilla. "Understanding WebAssembly text format". MDN Web Docs. 9 December 2019 khòaⁿ--ê.
- ↑ "Introduction — WebAssembly 1.0". webassembly.github.io. 18 June 2019 khòaⁿ--ê.
WebAssembly is an open standard...
- ↑ "Introduction — WebA ssembly 1.0". webassembly.github.io. 18 June 2019 khòaⁿ--ê.
WebAssembly is a ... code format
- ↑ "Conventions — WebAssembly 1.0". webassembly.github.io. 17 May 2019 khòaⁿ--ê.
WebAssembly is a programming language that has multiple concrete representations (its binary format and the text format). Both map to a common structure.
- ↑ "Introduction — WebAssembly 1.0". webassembly.github.io. 18 June 2019 khòaⁿ--ê.
... 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.
- ↑ "Introduction — WebAssembly 1.1". webassembly.github.io. 2021-02-19 khòaⁿ--ê.
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.
- ↑ Haas, Andreas; Rossberg, Andreas; Schuff, Derek L.; Titzer, Ben L.; Holman, Michael; Gohman, Dan; Wagner, Luke; Zakai, Alon; Bastien, JF (14 June 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.
- ↑ "Outside the web: standalone WebAssembly binaries using Emscripten · V8". v8.dev. 2020-07-28 khòaⁿ--ê.
- ↑ "Wasmer - The Universal WebAssembly Runtime". wasmer.io. 2021-02-19 khòaⁿ--ê.
Compile everything to WebAssembly. Run it on any OS or embed it into other languages.
- ↑ World Wide Web Consortium. "WebAssembly Core Specification". World Wide Web Consortium (W3). 9 December 2019 khòaⁿ--ê.
- ↑ Couriol, Bruno. "WebAssembly 1.0 Becomes a W3C Recommendation and the Fourth Language to Run Natively in Browsers". infoq.com. 9 December 2019 khòaⁿ--ê.
- ↑ "WebAssembly Specification — WebAssembly 1.1". webassembly.github.io. 2021-03-22 khòaⁿ--ê.
- ↑ "Programming Languages Software Award". www.sigplan.org.
- ↑ Bright, Peter (18 June 2015). "The Web is getting its bytecode: WebAssembly". Ars Technica. Condé Nast.
- ↑ "New Bytecode Alliance Brings the Security, Ubiquity, and Interoperability of the Web to the World of Pervasive Computing". Mozilla (ēng Eng-gí). 12 November 2019. 27 May 2019 khòaⁿ--ê.
Tsham-ua̍t
siu-kái- W3C (World Wide Web Consortium)
- Apache tsìng-tsiáu 2.0
- asm.js
- Google Native Client (PNaCl)
- Ars Technica
- Condé Nast
Guā-pōo liân-kiat
siu-kái- Koaⁿ-hong bāng-chām (Eng-gí)
- W3C Community Group (Eng-gí)
- WebAssembly Design (Eng-gí)
- "WebAssembly", MDN Web Docs (ēng Eng-gí) – with info on browser compatibility and specifications (WebAssembly JavaScript API) (Eng-gí)