98年的虎是什么命| 手指发麻是什么原因引起的| 什么是磁场| 牙周炎用什么药最见效| 纳粹是什么意思| 接吻有什么好处| 当驾校教练需要什么条件| 融合菜是什么意思| icloud是什么| 虱子长什么样| 医院附近适合做什么生意| 韩国的思密达是什么意思| 多动症去医院挂什么科室| 乳腺纤维瘤是什么原因引起的| 小孩子上户口需要什么证件| 1963年属什么生肖| 处级干部是什么级别| 女生什么时候是安全期| 韶关有什么特产| 上火吃什么可以降火| 非诚勿扰什么意思| 嗓子疼咽口水都疼吃什么药| 什么情况下需要切除子宫| 遗精是什么原因| 哇哦什么意思| 肚脐右侧是什么器官| 变态反应是什么意思| 尿检3个加号什么意思| 吃什么对前列腺有好处| 二氧化碳是什么东西| 居士是什么意思| 高考什么时候恢复的| aimer是什么意思| 顶包是什么意思| 高血糖不能吃什么| 喜神是什么意思| 白膜是什么东西| rh是什么单位| 甘油三酯高是什么原因引起的| 吐口水有血是什么原因| 姨妈期可以做什么运动| 一九六三年属什么生肖| 改姓需要什么手续| 乳酸杆菌是什么| 包皮是什么样子图片| dha有什么作用与功效| 一点小事就暴躁的人是什么病| alan什么意思| 西湖醋鱼是什么菜系| 土命缺什么| 寡淡是什么意思| 独活主治什么病| 肌层彩色血流星点状是什么意思| 混圈是什么意思| 牙痛吃什么药最快见效| 为什么叫深圳| 鼻孔里面痒是什么原因| 常乐我净是什么意思| 胭脂是什么| 嘴唇发紫黑是什么原因| 免疫治疗是什么意思| 屈曲是什么意思| 喉咙干疼吃什么药| 鳄鱼属于什么动物| 民营和私营有什么区别| 骨灰盒什么材质的好| 附带是什么意思| 断片是什么意思| 盐酸是什么| 老鹰代表什么生肖| 李子是什么水果| 冰火两重天是什么意思| 阁老相当于现在什么官| 言字旁与什么有关| 心慌是什么意思| pt是什么意思| 紫苏煮水喝有什么功效| 病退需要什么条件| 胃烧吃什么药| 6月22日是什么星座| 检点是什么意思| 肠溶片和缓释片有什么区别| 肠胃炎吃什么水果比较好| 扁平足是什么样子图片| 循环系统包括什么| 内痔用什么药治最好效果最快| 凝血五项是检查什么病| 胸口中间疼是什么原因| 莯字五行属什么| 萎缩性胃炎吃什么食物好| 肾看什么科| 血常规是什么意思| 修罗道是什么意思| 什么变化| 生物科学是什么专业| 塔罗牌能算什么| 夏天适合种什么蔬菜| 10月17日什么星座| 全科是什么科| 怀疑心衰做什么检查| 甲功五项能查出什么病| 杺是什么意思| 截疟是什么意思| 两个虎是什么字| 强直性脊柱炎吃什么药| 一直耳鸣是什么原因引起的| 血痰是什么原因| 乙肝看什么指标| 开黑是什么意思| 手麻胳膊麻是什么原因引起的| 嘴唇发紫是什么病| 喝酒手发抖是什么原因| 肺气肿什么症状| joola是什么牌子| 做血常规检查挂什么科| 牙齿贴面是什么意思| 槟榔长什么样子| 做胃镜挂什么科| 松字五行属什么| 东莞市委书记什么级别| 小孩吃榴莲有什么好处| 六扇门是什么意思| 晚上吃什么水果减肥效果最好| 胆量是什么意思| 烤鸭为什么那么便宜| 地球属于什么星| 老人生日送什么礼物好| 针眼用什么眼药水| 特别怕热爱出汗是什么原因| 香港有什么好吃的| 1.30是什么星座| 国师代表什么生肖| 胃酸是什么颜色| 益母草煮鸡蛋有什么功效| 录取线差是什么意思| 傻瓜是什么意思| 对什么有益英语| 驾照c2能开什么车| 为什么健身| 大便溏泄是什么意思| 什么水果是钙中之王| 土土心念什么| 养流浪猫需要注意什么| 内推是什么意思| 尿路感染是什么原因| 什么牌子的护肝药最好| 美平是什么药| 危楼高百尺的危是什么意思| 人为什么会得甲母痣| 老是嗝气是什么原因| 溃疡吃什么药| 什么是重生| 长焦镜头是什么意思| 见风使舵是什么生肖| 手上三条线分别代表什么| 杂菌阳性是什么意思| 肝火旺吃什么降火最快| 六月二十四是什么日子| 献血前要注意什么| 早上左眼跳是什么预兆| 副局长什么级别| 阴囊潮湿什么原因| 宝宝便秘吃什么食物好| 回盲瓣呈唇形什么意思| 人的脂肪是什么颜色| 静脉曲张挂什么科| 碧绿的什么| 喝什么解暑| 酪氨酸酶是什么东西| 腺管瘤是什么| 血糖低吃什么补的最快| 什么是自由基| 为什么我不快乐| 脚背疼挂什么科| sku是什么意思| 东倒西歪的动物是什么生肖| 如是观是什么意思| 钛是什么颜色| 什么情况下需要会诊| 女性分泌物发黄是什么原因| 我丢什么意思| 粘粉是什么粉| 痔疮复发的原因是什么| 皮什么结构| 硕字五行属什么| 博大精深什么意思| 没收个人全部财产是什么意思| 转音是什么意思| 栩是什么意思| 禁锢是什么意思| 什么病可以申请低保| 死有余辜是什么意思| 钩针ch是什么意思| 迎春花什么时候开| tap什么意思| 酱牛肉放什么调料| r值是什么意思| 煮黑豆吃有什么功效| 患得患失是什么意思| 热火朝天是什么生肖| 土豆发芽到什么程度不能吃| 热伤风吃什么感冒药| 系统性红斑狼疮不能吃什么| 什么原因导致宫外孕| 为什么医院开的钙都是碳酸钙| 中药和中成药有什么区别| 吃什么缓解孕吐| 徘徊什么意思| 静脉曲张挂什么科室| 双子后面是什么星座| 霉菌是什么引起的| 蒸馒头用什么面粉| 公安局局长什么级别| nerdy是什么牌子| 剔除是什么意思| 心率低吃什么药好| 媾什么意思| 吃什么降血糖最快| 吃什么可以化掉息肉| 阴虱用什么药物| 4月26是什么星座| trans什么意思| 嗓子哑是什么原因| 手一直抖是什么原因| 统考是什么意思| 切是什么偏旁| 为什么会有副乳| 什么色什么流| 小孩头疼是什么原因| 尿里加什么能冒充怀孕| 属鸡的是什么星座| 中的五行属性是什么| 什么是高情商| 钙化灶是什么意思| 什么叫情商| 姓陆的女孩取什么名字好| 为什么在| 猪肉和什么菜搭配最好| 什么是门户网站| 涌泉穴在什么位置| 梦见涨水是什么征兆| 低压48有什么危险| 女性生活疼痛什么原因| 阳瘘的最佳治疗方法是什么| 胃出血吃什么药好| 什么饮料好喝| 害怕的近义词是什么| 犹豫不决是什么生肖| afp检查是什么意思| 乌鱼是什么鱼| 肝病吃什么药好得快| 河里有什么鱼| candies什么意思| 今年是什么生肖年| 老是干咳嗽是什么原因| 肝的作用和功能是什么| 什么病不能吃核桃| 黑棕色是什么颜色| 什么是孝顺| 中暑喝什么| 孩子注意力不集中缺什么微量元素| 声音有磁性是什么意思| 女人肝胆湿热吃什么药| 不显怀的人有什么特点| 百度Jump to content

建立稳定生物钟 别让健康睡眠成为“奢侈品” 

From Wikipedia, the free encyclopedia
百度 每一个种子样本都要收集5000颗种子,由于遗传之间的杂交问题,不同的个体和不同品种花粉之间有可能产生杂交。

AssemblyScript
ParadigmsMulti-paradigm: functional, generic, imperative, object-oriented
FamilyECMAScript: JavaScript: TypeScript
Designed byDaniel Wirtz,[1] Max Graey[2]
DeveloperThe AssemblyScript Project[1]
First appeared2017; 8 years ago (2017)[3]
Stable release
0.28.3[4] Edit this on Wikidata / 12 July 2025; 20 days ago (12 July 2025)
Typing disciplineStatic
ScopeLexical
LicenseApache 2.0[5]
Filename extensions.ts
File formatstext, Unicode (source)
.wasm binary format (object)
Websitewww.assemblyscript.org
Major implementations
asc (AssemblyScript compiler)
Influenced by
JavaScript, TypeScript, WebAssembly

AssemblyScript is a TypeScript-based programming language that is optimized for, and statically compiled to, WebAssembly (currently using asc, the reference AssemblyScript compiler). Resembling ECMAScript and JavaScript, but with static data types, the language is developed by the AssemblyScript Project[6] with contributions from the AssemblyScript community.

Overview

[edit]

In 2017, the availability of support for WebAssembly, a standard definition for a low-level bytecode and an associated virtual machine, became widespread among major web browsers, providing web programs a lower-level and potentially higher-performance compiling target for client-side programs and applications to execute within web browsers, along with the interpreted (and in practice dynamically compiled) JavaScript web scripting language.[7] WebAssembly allows programs and code to be statically compiled ahead of time in order to run at potentially native-level or bare machine (metal) performance within web browsers, without the overhead of interpretation or the initial latency of dynamic compilation.[8]

With the adoption of WebAssembly in major web browsers, Alon Zakai, creator of Emscripten, an LLVMClang-based C and C++ compiler that targeted a subset of JavaScript named asm.js, added support for WebAssembly as a compiling target in Emscripten, allowing C and/or C++ programs and code to be compiled directly to WebAssembly.[9]

While Emscripten and similar compilers allow writing new code, or porting extant code, written in a high-level programming language such as C, C++, Go, and Rust to WebAssembly to achieve potentially higher, native-level execution performance in web browsers, this forces web developers accustomed to developing client-side web scripts and applications in ECMAScript–JavaScript (the de facto client-side programming language in web browsers) to use a different language to target WebAssembly than JavaScript. AssemblyScript, as a variant of TypeScript that is syntactically similar to JavaScript, allows developers accustomed to JavaScript to use a familiar language to target WebAssembly, potentially reducing the learning curve of a separate language that can be compiled to WebAssembly. Also, because AssemblyScript was designed to be an optimal source language for WebAssembly, the language's type system closely reflects that of WebAssembly,[10] and the language provides standard low-level functions (typically implemented as macros) that map directly to WebAssembly instructions that mirror instructions available on modern processors such as single instruction, multiple data (SIMD) and vector instructions and more specialized instructions such as clz (count leading zero bits), ctz (count trailing zero bits), and popcnt (population count), used in applications such as encryption and cryptographic libraries.[11]

asc, the reference AssemblyScript compiler, is based on Binaryen , a back-end compiler toolchain developed by Alon Zakai that compiles to WebAssembly and is a component of Emscripten (which Zakai also developed). The asc compiler and other tooling are available via the npm package manager.

While WebAssembly was originally designed for execution within web browsers, the development of WASI (WebAssembly System Interface), a community specification for a standard API that allows WebAssembly programs access to system calls and other operating system functions,[12] has led to the development of WebAssembly runtime environments from projects such as Wasmtime [13] and Wasmer [14] that allow WebAssembly, and code written in languages such as AssemblyScript that can compile to it, to run in non-web environments as well.[15]

Compatibility with JavaScript

[edit]

AssemblyScript is compiled to WebAssembly modules, which can then be instantiated into client-side Web pages using standard JavaScript methods such as WebAssembly.compileStreaming and WebAssembly.instantiateStreaming just like standard WebAssembly binaries.[16] Data passing between JavaScript and the compiled WebAssembly modules, as well as function calls between JavaScript and WebAssembly, are then the same as for any WebAssembly module.[17]

Because the AssemblyScript language is mostly a subset of TypeScript, it is theoretically possible to write an AssemblyScript program using this subset and compile it to both plain JavaScript and WebAssembly, using the TypeScript compiler and AssemblyScript compiler, respectively. This potentially allows portable code that can be used in either JavaScript or WebAssembly runtime systems (environments).

Use

[edit]

As of May 2025, more than 29,000 projects hosted on GitHub are written, either wholly or partly, in AssemblyScript,[18] with roughly 50,000 downloads of the AssemblyScript compiler per week via npm.[19][20]

In 2021, Webpack started using AssemblyScript to speed calculation of hash functions such as xxhash and md4 sources. This also made it possible to remove native dependencies.

Reception

[edit]

Lead Emscripten developer Alon Zakai has characterized AssemblyScript as being "designed with WebAssembly and code size in mind. It's not an existing language that we are using for a new purpose, but it's a language designed for WebAssembly. It has great wasm-opt integration—in fact, it's built with it—and it's very easy to get good code size."[21]

Norwegian musician Peter Salomonsen, in a 2020 WebAssembly Summit talk titled, "WebAssembly Music," demonstrated the use of AssemblyScript for real-time compiling to WebAssembly in live electronic music synthesis, saying, "I chose AssemblyScript because it has high-level readability and low-level control; it's like a high-level language, but you get that low-level feeling, and you can even write direct WebAssembly intrinsics if you want to."[22]

Aaron Turner, a senior engineer at Fastly, a cloud computing services provider that uses WebAssembly for the company's Compute@Edge serverless compute environment, in a review of AssemblyScript wrote:[23]

While AssemblyScript requires stricter typing than TypeScript does, it sticks as close as possible to TypeScript syntax and semantics—which means that most JavaScript developers will find AssemblyScript comfortable to use—and it enables great support for the modern JavaScript ecosystem. For instance, the AssemblyScript compiler is available on npm, as well as common AssemblyScript tools and libraries like as-pect. AssemblyScript files also use TypeScript's ‘.ts’ file extension, and it includes proper typings for allowing AssemblyScript to piggy-back on TypeScript tooling, such as the TypeScript linter. With the right small tweaks, AssemblyScript can even be used with the TypeScript compiler.

This is useful, as AssemblyScript offers a low-overhead entry-point for JavaScript developers to pick up a language to output WebAssembly—both in terms of learning to read and write AssemblyScript, and using much extant tooling that may already be in a JavaScript developer's workflow. AssemblyScript is often referred to in the WebAssembly community as a great gateway to picking up WebAssembly. It offers a large group of developers who already write applications for the web a path to pick up and learn WebAssembly. Even if you are starting from scratch and are not particularly familiar with JavaScript or TypeScript, AssemblyScript is a solid choice when picking a language to start outputting WebAssembly.

However, Turner went on to cite the language's relative newness and thus its lack of some features available in larger, more complex and established programming languages as potential but temporary shortcomings of the language.

See also

[edit]

References

[edit]
  1. ^ a b "AssemblyScript Working Group". GitHub.com. AssemblyScript Project. April 24, 2020. Retrieved February 10, 2021. Daniel Wirtz (@dcodeIO) - Author of AssemblyScript
  2. ^ Turner, Aaron (March 28, 2019). "WebAssembly for Javascript Developers". YouTube.com. WebAssembly SF. Retrieved February 10, 2021. @dcodeIO [Daniel Wirtz] and @MaxGraey [Max Graey]—they're the main two developers of AssemblyScript
  3. ^ "assemblyscript 0.1.0". npmjs.com. AssemblyScript Project. 2017. Retrieved February 10, 2021.
  4. ^ "Release 0.28.3". July 12, 2025. Retrieved July 15, 2025.
  5. ^ "License". GitHub.com. The AssemblyScript Project. September 29, 2017. Retrieved February 10, 2021. AssemblyScript/assemblyscript is licensed under the Apache License 2.0
  6. ^ "The AssemblyScript Project". GitHub.com. The AssemblyScript Project. Retrieved February 10, 2021.
  7. ^ "Roadmap". WebAssembly.org. WebAssembly Community Group. November 2017. Retrieved February 10, 2021.
  8. ^ WebAssembly Working Group. "WebAssembly". WebAssembly.org. WebAssembly Working Group. Retrieved February 10, 2021.
  9. ^ Zakai, Alon; Others. "Emscripten". Emscripten.org. Emscripten project. Retrieved February 10, 2021.
  10. ^ "Types". AssemblyScript.org. The AssemblyScript Project. Retrieved February 10, 2021.
  11. ^ "Environment". AssemblyScript.org. The AssemblyScript Project. Retrieved February 10, 2012.
  12. ^ The Wasmtime Project. "WASI: The WebAssembly System Interface". WASI.dev. The Wasmtime Project. Retrieved February 10, 2021.
  13. ^ The Wasmtime Project. "Wasmtime: A small and efficient runtime for WebAssembly & WASI". Wasmtime.dev. The Wasmtime Project. Retrieved February 10, 2021.
  14. ^ Wasmer, Inc. "Wasmer: The Universal WebAssembly Runtime". Wasmer.io. Wasmer, Inc. Retrieved February 10, 2021.
  15. ^ Jaghori, Sasan (August 1, 2023). Efficient Serverless Computing with WebAssembly (Master thesis). University of Applied Sciences Campus Vienna.
  16. ^ Mozilla Developer Network. "Loading and running WebAssembly code". developer.mozilla.org. Mozilla Developer Network. Retrieved February 10, 2021.
  17. ^ Mozilla Developer Network. "Using the WebAssembly JavaScript API". developer.mozilla.org. Mozilla Developer Network. Retrieved February 10, 2021.
  18. ^ "AssemblyScript/assemblyscript Dependency graph". GitHub.com. GitHub. Retrieved May 26, 2025.
  19. ^ npmjs. "assemblyscript Weekly Downloads". npmjs.com. Retrieved May 26, 2025.
  20. ^ "Resolve Error In Typescript". June 3, 2022. Saturday, 7 May 2022
  21. ^ Alon Zakai (February 19, 2020). "Shipping Tiny WebAssembly Builds". YouTube.com. WebAssembly-Summit.org. Retrieved February 10, 2021.
  22. ^ Peter Salomonsen (February 19, 2020). "WebAssembly Music". YouTube.com. WebAssembly-Summit.org. Retrieved February 10, 2021.
  23. ^ Aaron Turner (October 29, 2020). "Meet AssemblyScript: your next computing language". Fastly.com. Fastly. Retrieved February 10, 2021.
[edit]
粘是什么意思 恐龙什么时候灭绝的 万宝龙手表什么档次 莫言是什么学历 孕期血糖高可以吃什么水果
为什么不建议切除脂肪瘤 pt是什么元素 煎服是什么意思 等离子体是什么 螳螂吃什么
抽烟有什么好处 手淫过度有什么症状 舌苔很厚很白什么原因 冰箱为什么结冰 儿童中暑吃什么药
偏旁和部首有什么区别 财迷是什么意思 睡觉流眼泪是什么原因 核磁共振和ct有什么区别 铁观音适合什么季节喝
5.13是什么星座hcv8jop8ns2r.cn 牡丹花有什么颜色hcv9jop6ns7r.cn 甜菜根是什么菜youbangsi.com 想留不能留才最寂寞是什么歌hcv8jop9ns3r.cn 脚起皮干裂是什么原因hcv8jop7ns5r.cn
脑供血不足挂什么科sanhestory.com 倾注是什么意思hcv9jop8ns3r.cn amiri是什么牌子hcv9jop4ns1r.cn 妯娌是什么意思hcv9jop7ns0r.cn 为什么近视hcv8jop2ns0r.cn
鸡和什么菜一起烧好吃hcv7jop6ns2r.cn 人云亦什么qingzhougame.com 优甲乐是治什么病的hcv9jop2ns8r.cn 嘴唇发乌是什么原因hcv8jop9ns6r.cn 心脏早搏是什么原因造成的hcv9jop4ns1r.cn
血糖和尿糖有什么区别hebeidezhi.com 仔仔是什么意思hcv8jop5ns6r.cn 建议MRI检查是什么意思hcv7jop6ns1r.cn cs是什么元素hcv7jop9ns3r.cn 上日下立读什么liaochangning.com
百度