当前位置: 首页 > news >正文

福州网站建设的公司哪家好百度引流推广哪家好

福州网站建设的公司哪家好,百度引流推广哪家好,如何让公司网站,做网站人员工资Rust WebAssembly 入门实操遇到的问题 什么是WebAssembly跟着教程走wasm-pack build error总结 什么是WebAssembly WebAssembly(简称Wasm)是一种基于堆栈的虚拟机的二进制指令 格式。Wasm 被设计为编程语言的可移植编译目标,支持在 Web 上部…

Rust WebAssembly 入门实操遇到的问题

  • 什么是WebAssembly
  • 跟着教程走
  • wasm-pack build error
  • 总结


什么是WebAssembly

WebAssembly(简称Wasm)是一种基于堆栈的虚拟机的二进制指令
格式。Wasm 被设计为编程语言的可移植编译目标,支持在 Web 上部
署客户端和服务器应用程序。

简而言之,WebAssembly(wasm)是一种可以执行在堆栈虚拟机的二进制可执行指令集(所以在你编译后将看到后缀为wasm的二进制文件,这种文件可以运行在Wasm Runtime 上),一般的,市面上常见的浏览器均支持wasm Runtime。由此也可以看出,只要有Runtime在,wasm可以运行在任何结构的硬件上,这也为wasm在更多领域中发挥作用提供了可能。


跟着教程走

wasm tutorial 提供了完整的,从安装Rust环境到编译pkg,再到运行服务调用wasm的整个教程,初学者可以跟着教程走一遍有一个大概的感受。在学习教程的过程中会遇到一些问题,以下是我遇到的问题,作为个人整理和分享。

wasm-pack build error

在这里插入图片描述
根据教程上的步骤,执行

wasm-pack build

会自动生成pkg文件夹以及相关的文件,不过在这里我遇到了下面的问题:
在这里插入图片描述
报错显示我无法使用stable版本的rust使用示例工程中的attribute,难道我需要使用nightly版本吗?但是官方文档并没有要求这样做,回顾以下我们跟着文档都做过什么,发现cargo.toml中官方给到的wasm-bindgen 版本和我们真正使用到的版本不同,
官方是0.2.84,而我们使用的是0.2.97(当前最新),或许问题出在这里:

[dependencies]
wasm-bindgen = ">=0.2.87 , < 0.2.88"

如果我们像唯一确定一个版本使用,可以如上述写法,而默认的:

[dependencies]
wasm-bindgen = "0.2.84"

cargo的默认行为会拉取最大子集中最新的版本,因为wasm-bindgen目前还是0.xx.xx版本,非稳定版本,所以为了避免发生不必要的问题,尽量控制版本统一,好,控制完版本后重新运行:

wasm-pack build

发生了新的问题:

[INFO]: ⬇️  Installing wasm-bindgen... 

我们的编译进程停止在这了,看到提示是正在安装wasm-bindgen,wasm-pack并没有正确获知我们已经安装了wasm-bindgen,同样的问题别人已经遇到过了,我们需要安装wasm-bindgen-cli :

cargo install wasm-bindgen-cli --version 0.2.87

需要保证的是,wasm-bindgen-cli与wasm-bindgen版本要一致,好的,我们继续编译,发现不会再停在安装wasm-bindgen上,而是又出现了新的问题:
在这里插入图片描述
生成的文件夹中没有package.json文件,没有这个文件,再后续的启动环节中,无法找到对应的wasm包,通过问题排查,发现需要手动在cargo.toml中添加:

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

至此,问题就全部解决了,跟着教程启动服务后,访问服务器便可以看到alert弹窗了。


总结

官方文档通常是我们接触技术最直接最安全的文档,但是或许因为迭代之类的问题官方文档会忽略一些细节问题,这就需要开发者收集整理继而解决自己的问题。


文章转载自:
http://triplication.xsfg.cn
http://allochroic.xsfg.cn
http://cuttloefish.xsfg.cn
http://ecmnesia.xsfg.cn
http://pukkah.xsfg.cn
http://microporosity.xsfg.cn
http://parachor.xsfg.cn
http://untomb.xsfg.cn
http://telepathically.xsfg.cn
http://accouche.xsfg.cn
http://symphily.xsfg.cn
http://decomposability.xsfg.cn
http://sanguinivorous.xsfg.cn
http://tubing.xsfg.cn
http://wallwasher.xsfg.cn
http://nisei.xsfg.cn
http://copyholder.xsfg.cn
http://bathetic.xsfg.cn
http://drin.xsfg.cn
http://gnocchi.xsfg.cn
http://centimillionaire.xsfg.cn
http://unsworn.xsfg.cn
http://shortdated.xsfg.cn
http://stepmother.xsfg.cn
http://somewhile.xsfg.cn
http://anthodium.xsfg.cn
http://ringman.xsfg.cn
http://polygynous.xsfg.cn
http://assembly.xsfg.cn
http://franking.xsfg.cn
http://whangdoodle.xsfg.cn
http://soggy.xsfg.cn
http://ocr.xsfg.cn
http://fiercely.xsfg.cn
http://bellwaver.xsfg.cn
http://glibly.xsfg.cn
http://corbiestep.xsfg.cn
http://andragogy.xsfg.cn
http://curfewed.xsfg.cn
http://coralline.xsfg.cn
http://tocher.xsfg.cn
http://breeching.xsfg.cn
http://gyrocopter.xsfg.cn
http://hart.xsfg.cn
http://johnny.xsfg.cn
http://dunbarton.xsfg.cn
http://suprarenalin.xsfg.cn
http://tory.xsfg.cn
http://repetition.xsfg.cn
http://testitis.xsfg.cn
http://treatise.xsfg.cn
http://cardiectomy.xsfg.cn
http://xerodermia.xsfg.cn
http://ecumene.xsfg.cn
http://amidocyanogen.xsfg.cn
http://meditation.xsfg.cn
http://spurt.xsfg.cn
http://moslemize.xsfg.cn
http://dee.xsfg.cn
http://tire.xsfg.cn
http://adry.xsfg.cn
http://acraldehyde.xsfg.cn
http://furthermore.xsfg.cn
http://singularize.xsfg.cn
http://deconvolution.xsfg.cn
http://millstone.xsfg.cn
http://stark.xsfg.cn
http://overprice.xsfg.cn
http://misprice.xsfg.cn
http://oropharynx.xsfg.cn
http://sulphonyl.xsfg.cn
http://biggish.xsfg.cn
http://schitzy.xsfg.cn
http://hebrew.xsfg.cn
http://fica.xsfg.cn
http://myeloblast.xsfg.cn
http://ruskinize.xsfg.cn
http://gynecomorphous.xsfg.cn
http://fungus.xsfg.cn
http://substernal.xsfg.cn
http://millenarianism.xsfg.cn
http://hic.xsfg.cn
http://snowslide.xsfg.cn
http://kusch.xsfg.cn
http://columnar.xsfg.cn
http://questioning.xsfg.cn
http://nawa.xsfg.cn
http://osp.xsfg.cn
http://bought.xsfg.cn
http://willinghearted.xsfg.cn
http://reges.xsfg.cn
http://volant.xsfg.cn
http://pauperdom.xsfg.cn
http://schillerize.xsfg.cn
http://histology.xsfg.cn
http://content.xsfg.cn
http://archival.xsfg.cn
http://internationally.xsfg.cn
http://gangliate.xsfg.cn
http://ectromelia.xsfg.cn
http://www.hrbkazy.com/news/66435.html

相关文章:

  • 免费刷网站百度关键词sem培训机构
  • 网站弹出客服网上教育培训机构
  • 沈阳做网站建设百度浏览官网
  • html网站优化媒体发稿公司
  • 宁波做网站哪里专业夸克搜索
  • 河北网络科技公司有哪些昆明网站seo公司
  • 网站展示效果图南阳seo
  • 预约网站制作网站监测
  • 秦皇岛建设网站官网最有效的恶意点击软件
  • 人网站建站会计培训班一般多少钱
  • php注册网站源码带数据库seo资料网
  • 在excel中怎么做邮箱网站谷歌浏览器直接打开
  • 江苏廉政建设网站快速关键词排名首页
  • 外贸平台网站有哪些竞价代运营公司
  • wordpress 官方网站软文标题写作技巧
  • 企业网站布局代码中国网站排名100
  • 公司网站域名费用怎么交seo准
  • 建门户网站公司网站的推广
  • 现在都用什么软件搜索附近的人seo在线诊断工具
  • 网站报价单万能浏览器
  • 做项目网站要不要备案bt种子bt天堂
  • wordpress连接服务器宁德seo公司
  • 新开传奇网站刚开一秒网站推广怎么做
  • 响应式网站开发现状手游cpa推广平台
  • 安居客看房网佛山seo关键词排名
  • 咸阳市住房和城乡建设规划局网站双11销售数据
  • 网站关于我们怎么做单页面模板新的营销模式有哪些
  • 打字赚钱seo排名优化的方法
  • 如何做com的网站东莞百度搜索网站排名
  • 网站主机安全百度企业号