Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby & WebAssembly Introduction

Yuta Saito
November 11, 2022

Ruby & WebAssembly Introduction

Yuta Saito

November 11, 2022
Tweet

More Decks by Yuta Saito

Other Decks in Programming

Transcript

  1. About me • Yuta Saito / @kateinoigakukun • ૣҴాେֶ جװཧ޻ֶ෦

    ৘ใཧ޻ֶՊ4೥ • ύʔτλΠϜ։ൃऀ @ • CRubyͷWebAssembly/WASIϝϯςφ
  2. WebAssembly (Wasm) • CPUΞʔΩςΫνϟʹґଘ͠ͳ͍ • ιʔεݴޠʹґଘ͠ͳ͍ • ϗετ؀ڥ΁ͷΞΫηε੍ݶ • ʢͦͦ͜͜ʣߴ଎

    https://hacks.mozilla.org/2017/02/creating-and-working-with-webassembly-modules/ ಛ௃
  3. WebAssembly (Wasm) • ϒϥ΢β͔Βಠཱͨ͠WebAssemblyϥϯλΠϜ࣮૷͕ଟ਺ • Wasmtime, WAMR, Wasmer, etc… •

    ΞϓϦέʔγϣϯʹ૊ΈࠐΈ΍͍͢ (like mruby) • ϢʔβʹΑΔʮ৴པͰ͖ͳ͍ϓϩάϥϜʯΛೖྗ͢Διϑτ΢ΣΞͰศར • ྫ) ϓϥάΠϯγεςϜɺαʔόʔϨεɺetc… Webϒϥ΢βҎ֎Ͱ΋ศར
  4. ϓϩάϥϜͷ഑෍୯Ґ Computer Hypervisor OS OS OS OS Libs Libs Libs

    App App App Computer OS Docker Libs Libs Libs App App App Computer OS WebAssembly Runtime App App App VMΠϝʔδ ίϯςφ .wasm
  5. ՝୊ ίʔυαΠζ • RubyεΫϦϓτͷαΠζ: 22MB • ؆୯ͳMini fi cation ->

    18MB • RubyΠϯλϓϦλͷαΠζ: 8.2MB • Asyncifyલ: 5.9MB