Skip to content

Latest commit

 

History

History

wasm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

WASM

This directory contains code to explore how we can use WebAssembly modules from Go and how we can pass data between the host and the module.

To extend the Kubernetes Authentication, Authorization and Admission process we have to pass the relevant data to the WASM module and reveive the result from the module. For this we use data in the same format as it is used for the webhooks (TokenReview, SubjectAccessReview, AdmissionReview).

First we have to verify that we can pass raw bytes ([]byte) back and forth. For this we implement a module which takes a string and transforms it to upper case. In a second step we send a JSON encoded TokenReview back and forth.

We implement these basic steps which we later use in our Kubernetes extension with different data passing mechanisms:

  • raw: Run alloc, dealloc manually and pass pointers.
  • wasi: Read and write from and to standard input and standard output
  • wapc: Use waPC specification

Links