WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits...

26
WebAssembly - The Next Big Platform Sven Sauleau 2019 1

Transcript of WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits...

Page 1: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly - The Next Big Platform

Sven Sauleau

2019

1

Page 2: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Sven Sauleau @svensauleau

@svensauleau 2

Page 3: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

JavaScript, what happened?

Page 4: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Loading time

1. Fetching.

2. Parsing source.

3. Compiling + optimizing∞−→ reoptimizing.

@svensauleau 4

Page 5: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Performance

Dynamic and untyped.

Complex runtime.

Managed memory.

@svensauleau 5

Page 6: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Became acompilation target

Page 7: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

F# Scala Haskell OCaml . . .

JavaScript

The Web

@svensauleau 7

Page 8: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly,at the rescue?

Page 9: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Sources

C/C++ Rust Golang Haskell . . .

Compilers

Emscripten rustc GoGHC

Asterius

LLVM

Binaryen

WebAssembly Module

@svensauleau 9

Page 10: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly Module

Runtimes

Web browsers

(Firefox, Chrome, Safari, ...)

Other environments

(WASI, WAVM, crypto...)

@svensauleau 10

Page 11: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

What’s evenWebAssembly?

Page 12: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly is a

portable,

low-level,

safe

format.

@svensauleau 12

Page 13: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Inside the black box

Page 14: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

...

y from x

import section

func #2

export section

WebAssembly Module

JS JS

@svensauleau 14

Page 15: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Unpopular Opinions: WebAssembly edition.

@svensauleau 15

Page 16: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

@svensauleau 16

Page 17: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

No.

@svensauleau 17

Page 18: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly all thethings?

Page 19: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Probably not.

@svensauleau 19

Page 20: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

WebAssembly is designed to be a

complement to, not replacement of,

JavaScript.

@svensauleau 20

Page 21: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

demo!

Page 22: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Rust andWebAssembly

Page 23: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

@svensauleau 23

Page 24: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

@svensauleau 24

Page 25: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

demo!

Page 26: WebAssembly - The Next Big PlatformKickstart your Rust, WebAssembly, and Webpack project! O commits New pull request p 2 branches View license Clone or download Create new file Upload

Thanks!