webassembly system interface (wasi) changes everything.. getting started tutorial using rust & wasm

Chris Hay May 3, 2022
Video Thumbnail
Chris Hay Logo

Chris Hay

@chrishayuk

About

hi there, welcome to my channel, hope you enjoy it and are as having as much fun as i am. my name is chris hay and i love code, software architecture and technology in general. as you may have figured, i work for IBM (who i love working for) but all opinions are most definitely my own and do not represent the views of my employer

Video Description

in this video we look at how using WASI (web assembly system interface), we can create more powerful webassembly applications that can interact with i/o such as the console and filesystems using WASI. we create some rust cli apps and then build their equivalent webassembly cli apps in rust. we explore how to write to the console. write to files and access command line arguments. finally we look at how we can use runtimes to excute our cli apps or create native executables, as well as thinking about webassembly/wasi use cases. code is on github https://github.com/chrishayuk/chuk-wasi-rust 00:00 - introduction 01:50 - creating a rust cli application with cargo new 03:20 - executing our rust cli application 03:45 - introducing WASI (Web Assembly System Interface) 04:25 - targeting our rust application for WASI 05:15 - building our wasi webassemby app 07:30 - introducing wasmtime (webassembly runtime) 07:50 - installing wasmtime 08:06 - executing our wasm with wasmtime runtime 09:07 - speeding up development with cargo wasi 10:15 - executing our wasi webassembly module with wasmer runtime 11:10 - creating a webassembly exe with wasmer 12:41 - comparing rust cli app sizes with wasmer cli apps 14:00 - webassembly and wasi use cases 15:15 - accessing command line arguments with wasi 19:20 - writing files using webassembly, wasi and rust 23:30 - filesystem sandboxes with wasi 24:30 - webassembly wasi use-cases vs native rust 26:00 - outro

Essential Camera Accessories Now

AI-recommended products based on this video

Loading...
NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

(2,807)
$181.49
FREE delivery Sun, Aug 10
Loading...
Fewlby Kids Rain Suit for Boys Girls Toddler Raincoats One Piece Hoodie Cartoon Coverall Waterproof Rainwear M Size

Fewlby Kids Rain Suit for Boys Girls Toddler Raincoats One Piece Hoodie Cartoon Coverall Waterproof Rainwear M Size

(94)
$35.90
PrimeFREE delivery Sat, Jun 14
Loading...
SanDisk 64GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXU-064G-GN4IN

SanDisk 64GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXU-064G-GN4IN

(71,074)
$21.99$16.59
FREE delivery Sun, Aug 10 on your first order
500+ bought in past month
Loading...
SanDisk 128GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXD-128G-GN4IN
Best Seller

SanDisk 128GB Extreme PRO SDXC UHS-I Memory Card - C10, U3, V30, 4K UHD, SD Card - SDSDXXD-128G-GN4IN

(71,074)
$29.99$26.61
FREE delivery Sun, Aug 10 on your first order
4K+ bought in past month
Loading...
Lexar 128GB Micro SD Card, microSDXC UHS-I Flash Memory Card with Adapter - Up to 100MB/s, A1, U3, Class10, V30, High Speed TF Card

Lexar 128GB Micro SD Card, microSDXC UHS-I Flash Memory Card with Adapter - Up to 100MB/s, A1, U3, Class10, V30, High Speed TF Card

(26,884)
$18.99
FREE delivery Wed, Aug 20 on your first order
5K+ bought in past month
Loading...
Kaiess 62" Tripod for iPhone, Selfie Stick Tripod & Phone Tripod Stand with Remote, Cell Phone Tripod for iPhone, Extendable Travel Tripod Compatible with iPhone 14/13/12 Pro Max/Android
Best Seller

Kaiess 62" Tripod for iPhone, Selfie Stick Tripod & Phone Tripod Stand with Remote, Cell Phone Tripod for iPhone, Extendable Travel Tripod Compatible with iPhone 14/13/12 Pro Max/Android

(5,298)
$28.98
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

(3)
$44.99
FREE delivery Thu, Jun 19
Loading...
SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

(85)
$38.24
FREE delivery Thu, Jun 19
Loading...
STARTRC GAMES Hard Carrying Case for Nintendo Switch 2, Professional Deluxe IP67 Waterproof, Soft Lining Hard Travel Case for Nintendo Switch 2 Console Pro Controller & Accessories (Black)

STARTRC GAMES Hard Carrying Case for Nintendo Switch 2, Professional Deluxe IP67 Waterproof, Soft Lining Hard Travel Case for Nintendo Switch 2 Console Pro Controller & Accessories (Black)

(2)
$65.99
PrimeFREE delivery Sun, Jun 15
Loading...
BRITA On Tap Faucet Water Filter System Replacement Filters, White, 1 Count

BRITA On Tap Faucet Water Filter System Replacement Filters, White, 1 Count

(1,292)
$16.88$13.79
FREE delivery Tue, Sep 23 on your first order
200+ bought in past month
Loading...
Faucet Filter Replacement, Compatible with Brita 36311 On Tap Faucet Water Filtration System, Brita FR-200, FF-100 Replacement Filters for Faucets, Reduces Lead, BPA Free, 3-Pack

Faucet Filter Replacement, Compatible with Brita 36311 On Tap Faucet Water Filtration System, Brita FR-200, FF-100 Replacement Filters for Faucets, Reduces Lead, BPA Free, 3-Pack

(170)
$37.99
FREE delivery Tue, Sep 23
100+ bought in past month
Loading...
Brita Faucet Filter Replacement - Compatible With Brita 36311 & 42618 On Tap Faucet Water Filtration System, FR-200 & FF-100 Replacement Filters, Reduces Lead, BPA Free, Chrome, 3-Pack

Brita Faucet Filter Replacement - Compatible With Brita 36311 & 42618 On Tap Faucet Water Filtration System, FR-200 & FF-100 Replacement Filters, Reduces Lead, BPA Free, Chrome, 3-Pack

(99)
$37.99
FREE delivery Tue, Sep 23
100+ bought in past month
Loading...
Frizzlife 400-Gallon Electric Water Filter Dispenser with 2 Filters (8-Stage Filtration),Reduce 99.9% of Lead, 6 Months Rechargeable Water Pitcher, BPA-Free Instant Countertop Water Filter System,MD40

Frizzlife 400-Gallon Electric Water Filter Dispenser with 2 Filters (8-Stage Filtration),Reduce 99.9% of Lead, 6 Months Rechargeable Water Pitcher, BPA-Free Instant Countertop Water Filter System,MD40

(46)
$179.99
FREE delivery Tue, Sep 23