Wasmer 2.0 yakatoburitswa uye inouya neSIMD, kugadzirisa uye nezvimwe

Mushure memwedzi ingangoita mitanhatu kuvhurwa kweshanduro yekutanga, kuvhurwa kweshanduro nyowani yeiyo Wasmer chirongwa chakaziviswa, chiri muchikamu chayo chechipiri chikuru uye mune shanduko dzakakosha dzakaitwa kusvika padanho rekuti maAPI emukati mune iyi yechipiri vhezheni haapindirane, kunyange hazvo zvinhu zvitsva zvakawedzerwawo izvo zvinowedzera kugadzikana, kuchengetedzeka uye kugadzirisa mashandiro.

Kune avo vasingazive Wasmer, iwe unofanirwa kuziva kuti inovandudza nguva yekumhanya kuti iite WebAssembly mamodule iyo inogona kushandiswa kugadzira maficha epasirese ayo anogona kumhanya pane akawanda masisitimu anoshanda uye kumhanya isina kuvimbika kodhi iri yega

Kubatika kunopihwa nekunyora kodhi yekushandisa mune yakadzika-chikamu WebAssembly middleware Inogona kumhanya pane chero sisitimu inoshanda kana kubatanidzwa muzvirongwa mune mimwe mitauro yekuronga. Zvirongwa zviri zvisingaremi midziyo inomhanya iyo WebAssembly pseudocode.

Izvi midziyo haina kusungwa kune inoshanda system uye inogona kusanganisira kodhi pakutanga yakanyorwa mune chero mutauro zvirongwa. Iyo Emscripten Toolkit inogona kushandiswa kuumbiridza kune WebAssembly. Kuti ududzire WebAssembly kune yazvino chikuva muchina kodhi, kubatanidza akasiyana ekuvaka kumashure (Singlepass, Cranelift, LLVM) uye mainjini (uchishandisa JIT kana inogadzira kodhi yemuchina) inotsigirwa.

Kuwana kudzora uye kudyidzana nehurongwa zvinopihwa kuburikidza neWASI (WebAssembly System Interface) API, iyo inopa mapurogiramu ekushandira ekushanda nemafaira, zvigadziko, uye mamwe mabasa anopiwa nehurongwa hwekushandisa.

Zvikumbiro zvakasarudzika kubva kuhurongwa hukuru uye ivo vanokwanisa kuwana chete kune yakaziviswa mashandiro (chengetedzo mashandiro anoenderana neanogona manejimendi ezviito neimwe yeiyo zviwanikwa (mafaera, madhairekitori, zvigadziko, mafoni mafoni, nezvimwewo).

Zvinyorwa zvitsva zve Wasmer 2.0

Mune iyi vhezheni nyowani yakapihwa, zvinotaurwa kuti shanduko yakakosha muhuwandu hweshanduro naWasmer inosanganisirwa nekuunzwa kwekusawirirana kuchinjika kune yemukati API, iyo, sekureva kwevagadziri, hazvizokanganisa 99% yevashandisi kubva pachikuva nenzira ipi neipi.

Iko zvakare kune shanduko mune fomati ye serialized Wasm module pakati peakakura shanduko mukuenderana (ma module akaiswa muWasmer 1.0 haazoshandisike muWasmer 2.0).

Uyewo, tsigiro yemirairo yeSIMD yakasimbiswa (Kuraira Kwoga, Multiple Data) iyo tendera kuenzanirana kwekuita kwedata. Nzvimbo idzo kushandiswa kweSIMD kunogona kuwedzera zvakanyanya kugadzirwa kunosanganisira kudzidza kwemuchina, vhidhiyo kukodha uye kugadzirisa, kugadzirisa mifananidzo, kuita kwepanyama simulation, uye grafiti kumonyoroka.

Tambien rutsigiro rwemhando dzemhando dzinojekeswa, ichibvumira maWimm module kuwana ruzivo mune mamwe mamodule kana mune yepasi nharaunda uye akakosha mashandiro ekugadzirisa akaitwa. Iyo LLVM yekumhanyisa mhanyisa nenhamba dzinoyerera dzinowedzeredzwa neinenge 50%.

Basa rekufona rakamhanyiswa zvakanyanya nekuderedza mamiriro ezvinhu anoda kernel kufona. Iko kushanda kweiyo Cranelift kodhi jenareta yakawedzerwa ne40%. Dhata rekushomeka kwenguva kudzikisira. Kuti uratidze zvakanyatsojeka chirevo, mazita enjini akachinjwa: JIT → Universal, Native → Dylib (Dynamic Library), Object File → StaticLib (Static Library).

Finalmente Kana iwe uchifarira kudzidza zvakawanda nezve Wasmer, iwe unofanirwa kuziva kuti kodhi yeprojekiti yakanyorwa muRust, ine MIT rezinesi uye unogona kutarisa ruzivo rwayo pane yayo yepamutemo webhusaiti pa inotevera chinongedzo.

Isa iyo Wasmer yekumhanyisa nguva

Kune rimwe divi, kune avo vanofarira kugona kumhanyisa mudziyo weWebAs Assembly, iwe unongofanirwa kuisa iyo Wasmer nguva yekumhanya pane yako system, iyo inouya isina zvinoenderana nekunze.

Izvo zvakakosha kutaura izvozvo Wasmer inogona kumhanyisa pane chero chikuva macOS, Linux neWindows, chinodiwa chete ndechekuti nguva yayo yekumhanya iiswe pane yako system.

Kuti uite izvi, chingomhanya unotevera kuraira mune terminal:

curl https://get.wasmer.io -sSfL | sh

Uye mushure meizvozvo, ivo vanofanirwa kuitisa iyo inodiwa faira:

wasmer test.wasm

Kana iwe uchida kuziva zvakawanda nezvekuti Wasmer anoshanda sei kana kuda kuziva yayo sosi kodhi, unogona kutarisa zvese izvo Mune inotevera chinongedzo.


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako