您现在的位置是:热点 >>正文
Docker+Wasm 技术预览简介
热点292人已围观
简介...
什么是 Wasm?
WebAssembly,通常简称为 Wasm,是一种相对较新的技术,允许您编译用 40 多种语言(包括 Rust、C、C++、JavaScript 和 Golang)编写的应用程序代码,并在沙盒环境中运行它。
最初的用例侧重于在网络浏览器中运行本机代码,例Do如Figma、AutoCAD和Photoshop。事实上,fastq.bio在将其基于 Web 的 DNA 序列质量分析器转换为 Wasm 时,速度提高了20 倍。迪士尼在 Wasm 之上构建了他们的Disney+ 应用程序开发工具包!浏览器中的好处显而易见。
但由于WebAsseckmbly 系统接口(WASI),Wasm 正在迅速传播到浏览器之外。Vercel、Fastly、Shopify和Cloudflare等公司支持使用 Wasm 在边缘运行代码,而Fermyon正在构建一个平台以在云端运行 Wasm 微服务。
为什么是Docker?
在 Docker,我们er的目标是通过克服应用程序开发的复杂性来帮助开发人员将他们的想法变为现实。我们努力让构建、共享和运行您的应用程序变得容易,无论底层技术如何。通过让所有人都能使用容器,我们证明了我们有能力让开发人员的生活更轻松,并被公认为最受欢迎的开发人员工具第一名。
我们将 Wa+Wsm 视为 Linux 容器的补充技术,开发人员可以根据用例选择他们使用的技术(或两者!)。随着社区探索 Wasm 的可能性,我们希望使用您了解和喜爱的经验和工具帮助使 Wasm 应用程序更容易开发、构建和运行。
Wasm 集成实际上是如何工作
1.我们正在利用我们最近的工作将图像as管理迁移到 containerd,因为它提供了使用与 OCI 兼容的工件和 containerd 垫片的能力。
2.我们与WasmEdge合作创建了一个 containerd shim。该 shim 从 OCI 工件中提取 Wasm 模块并使用 WasmEdge 运行时运行它。
3.我们添加了m 声明 Wasm 运行时的支持,这将允许使用这个新的 shim。
安装预览版后,我们可以运行以下命令来启动示例 Wasm 应用程序:
docker run -dp 8080:8080 --name=wasm-example --runtime=io.containerd.wasmedge.v1技术 --platform=wasi/wasm32 michaelirwin244/wasm-example
由于一些标志可能不熟悉,让我们解释一下它们在做什么:
--runtime=io.containerd.wasmedge.v1– 这会通知 Docker 引擎我们要使用 Wa预览sm containerd shim 而不是标准的 Linux 容器运行时
--platform=wasi/wasm32– 这指定了我们要使用的图像的架构。通过利用 Wasm 架构,我们不需要为不同的架构构建单独的图像。Wasm 运行时将完成将 Wasm 二进制文件转换为机器指令的最后一步。
镜简介像拉取后,runtime 会读取ENTRYPOINT镜像的 来定位并提取 Wasm 模块。然后将该模块加载到 Wasm 运行时、启动并配置网络。现在我们的机器上运行了一个 Wasm 应用程序!
这个特定的应用程序是一个简单的 Web 服务器,上面写着“Hello world!” 并将数据Do回显给我们。为了验证它是否正常工作,让我们首先查看日志。
docker logs wasm-example
Server is now running
我们可以通过打开http://localhost:8080或使用 curl 来获取“Hello world”消息。
curl localhckost:8080
我们的响应会给我们一条 Hello world 消息:
Hello world from Rust running with Wasm! Send POST data to /echo to have it echoed back to you
要将数据发送到 echo 端点,我们可以使用 curler:
curl localhost:8080/echo -d '{"message":"Hi there"}' -H "Content-type: application/json"
我们将看到发回以在响应中使用的数据:
{"message":"Hi there"}
要删除+W应用程序,您可以像删除任何其他 Docker 服务一样删除它:
docker rm -f wasm-example
新的集成意味着您可以与 Linux 容器一起运行 Wasm 应用程序(甚至使用 Compose)。
Tags:
相关文章
标签: 智谱 唐杰 AGI TouchHigh
热点云梦级7月11日云梦级消息,港股上市大模型企业智谱在限售股解禁后股价出现大幅波动。智谱截止昨日休市跌超19%,今日晚间,智谱创始人唐杰,发布主题为《巨浪已来》的内部信。 唐杰提出延续“反直觉”路线,并...
【热点】
阅读更多库克对话中国大学生:苹果与CDRF一道,促进贫困地区教育数字化
热点来源:中国发展研究基金会 最近,22岁的知名B站up主@老师好我叫何同学采访苹果CEO蒂姆·库克(Tim Cook)的视频火了。 在20分钟的英文对话中,两人畅聊科技创新、生活理念和数字教育。 谈及贫...
【热点】
阅读更多标签: 通用汽车 中国零件 供应链 玛丽·巴拉
热点云梦级11月13日云梦级消息,据路透社援引四位知情人士报道称,美国通用汽车(General Motors)已指示数千家供应商,要求在供应链里排除中国零件。这反映出汽车制造商对其运营受到地缘政治干扰的日...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://dict.naver.com/dict.search?dicQuery&query=谷歌霸屏技术【tg:seogoogle987】szp
- https://www.shacknews.com/editorial-search?q=谷歌霸屏技术【tg:seogoogle987】,GKk
- https://www.tmtpost.com/search?q=谷歌霸屏技术【tg:seogoogle987】,dlA
- https://www.resilienz-akademie.com/?cat=71&s=谷歌霸屏技术【tg:seogoogle987】,fkj
- https://www.ons.gov.uk/search?q=谷歌霸屏技术【tg:seogoogle987】,46l
- https://www.remit.co.jp/pt/?action=CHECK&s=谷歌霸屏技术【tg:seogoogle987】,OM3
- https://www.oikos-tecnics.com/?s=谷歌霸屏技术【tg:seogoogle987】,sxE
- https://www.schenckprocess.com/search?q=谷歌霸屏技术【tg:seogoogle987】,DXS
- https://www.u-bourgogne.fr/?cat=117&s=谷歌霸屏技术【tg:seogoogle987】,FtO
- https://www.remit.co.jp/vi/?s=谷歌霸屏技术【tg:seogoogle987】,vIj
- https://www.whatsonstage.com/search?cat=64&term=谷歌霸屏技术【tg:seogoogle987】,GJa
- https://www.laoairlines.com/?action=QUERY&s=谷歌霸屏技术【tg:seogoogle987】,XHX
- https://www.madebyoranges.com/nl/search/谷歌霸屏技术【tg:seogoogle987】,Vse
- https://www.openspaceinstitute.org/search?q=谷歌霸屏技术【tg:seogoogle987】,F0I
- https://www.reallywildbirdfood.co.uk/store/search?q=谷歌霸屏技术【tg:seogoogle987】,fi5
- https://www.valuecolleges.com/?action=QUERY&s=谷歌霸屏技术【tg:seogoogle987】,SUo
- https://www.symatoys.com/search.html?ID=UyMD6aO58bPrJvQAB1I0N69KzJBZeNPC&keyword=谷歌霸屏技术【tg:seogoogle987】,bhz
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=谷歌霸屏技术【tg:seogoogle987】9tj
- https://www.nytimes.com/search?dropmab=true&query=谷歌霸屏技术【tg:seogoogle987】,36U
- https://www.kaskus.co.id/search?q=谷歌霸屏技术【tg:seogoogle987】,YsQ
- https://www.otakuninjahero.com/en/search/谷歌霸屏技术【tg:seogoogle987】,FTi
- https://www.teamlab.art/it/?submit=谷歌霸屏技术【tg:seogoogle987】,5D8
- https://www.quarterjacksurgery.co.uk/?AT=3rBy&s=谷歌霸屏技术【tg:seogoogle987】,4Nk
- https://www.openstreetmap.org/search?query=谷歌霸屏技术【tg:seogoogle987】,jNv
- https://www.normani.de/search?q=谷歌霸屏技术【tg:seogoogle987】,a8P
- https://www.teamlab.art/zh-hans/?submit=谷歌霸屏技术【tg:seogoogle987】,JwN
- https://www.so.com/s?ie=utf-8&src=360sou_home&_re=0&q=谷歌霸屏技术【tg:seogoogle987】,EDG
- https://www.msrenewal.com/search/谷歌霸屏技术【tg:seogoogle987】,r3V
- https://www.sportbiketracktime.com/index.php?route=product/search&tag=谷歌霸屏技术【tg:seogoogle987】,XnO
- https://www.klatreverden.no/search?q=谷歌霸屏技术【tg:seogoogle987】,vWS
- https://www.remit.co.jp/id/?s=谷歌霸屏技术【tg:seogoogle987】,UtW
- https://search.danawa.com/dsearch.php?query=谷歌霸屏技术【tg:seogoogle987】idk
- https://www.xbiao.com/search/index?tpf&wd=谷歌霸屏技术【tg:seogoogle987】,FbQ
- https://www.qidulp.com/search?query=谷歌霸屏技术【tg:seogoogle987】,qkf
- https://www.stonerealestate.com.au/?cat=100&s=谷歌霸屏技术【tg:seogoogle987】,hHj
- https://www.tiktok.com/tag/谷歌霸屏技术【tg:seogoogle987】,alI
- https://xehay.vn/tim-kiem/=谷歌霸屏技术【tg:seogoogle987】,nDb
- https://www.lifesciencesweden.se/search?q=谷歌霸屏技术【tg:seogoogle987】,Ze3
- https://www.nss.nhs.scot/search?q=谷歌霸屏技术【tg:seogoogle987】,cBG
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=谷歌霸屏技术【tg:seogoogle987】,m1u
- https://yscc1986.net/search/谷歌霸屏技术【tg:seogoogle987】7Bn
- https://www.nslcleaders.org/?s=谷歌霸屏技术【tg:seogoogle987】,Y1i
- https://www.wuv.edu/?s=谷歌霸屏技术【tg:seogoogle987】,k6o
- https://www.pearson.com/en-us/search.html?aq=谷歌霸屏技术【tg:seogoogle987】,8lN
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌霸屏技术【tg:seogoogle987】wyP
- https://www.southmeadows.co.uk/2019/07/?s=谷歌霸屏技术【tg:seogoogle987】,l2R
- https://www.rea.govt.nz/search?searchterm=谷歌霸屏技术【tg:seogoogle987】,iQB
- https://www.localfootdoc.com/?s=谷歌霸屏技术【tg:seogoogle987】,L65
- https://www.tarleton.edu/?s=谷歌霸屏技术【tg:seogoogle987】,j1H
- https://www.safetv.go.kr/base/search/view?searchWord=谷歌霸屏技术【tg:seogoogle987】rRt