Skip to content

Demonstration of using a Rust crate in Typescript/Javascript by compiling to WASM with wasm-pack

Notifications You must be signed in to change notification settings

maheshsundaram/karkata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karkata

A demonstration of using a Rust crate in Typescript/Javascript/Browser by compiling to WASM.

Uses

  • wasm-pack
  • RustCrypto AES-GCM

Extra Credit

  • Demo web app showing encryption -> decryption using compiled ES module

Requires

  • rust toolchain >= 1.7.0
  • wasm-pack
  • npm

Build Steps

  • cd aes-gcm && wasm-pack build --target web
  • npx -p typescript tsc --module esnext --target esnext --outDir . *.ts

Run

  • Using e.g. Deno's file_server (install with deno install -f --allow-net --allow-read https://deno.land/std/http/file_server.ts)
    • file_server .
    • open output url

About

Demonstration of using a Rust crate in Typescript/Javascript by compiling to WASM with wasm-pack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published