Skip to content

JavaScriptBench/wasm

 
 

Repository files navigation

This repo contains the tooling that allows you to build and push WASM envoy filters, so they will be accessible to gloo.

To do so, first build the tool

go build .

The build the example filter (mostly copied from the envoy-wasm):

(cd example; bazel build :filter.wasm :filter_proto)

Push:

./wasme push gcr.io/solo-public/example-filter:v1 example/bazel-bin/filter.wasm example/bazel-bin/filter_proto-descriptor-set.proto.bin

load in to gloo:

kubectl edit -n gloo-system gateways.gateway.solo.io.v2 gateway-proxy-v2

set the httpGateway field like so:

  httpGateway:
    plugins:
      extensions:
        configs:
          wasm:
            config: yuval
            image: gcr.io/solo-public/example-filter:v1
            name: yuval
            root_id: add_header_root_id
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
  name: default
  namespace: gloo-system
spec:
  virtualHost:
    domains:
    - '*'
    routes:
    - matcher:
        exact: /sample-route-1
      routeAction:
        single:
          upstream:
            name: default-petstore-8080
            namespace: gloo-system
      routePlugins:
        prefixRewrite:
          prefixRewrite: /api/pets

emscripten sdk

If you change the emscripten SDK, an sdk with PR merged is needed: https://github.com/emscripten-core/emscripten/pull/9812/files

About

Web Assembly tools and SDKs for extending cloud-native infrastructure

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 77.7%
  • Starlark 7.6%
  • Rust 6.7%
  • Shell 2.9%
  • Makefile 2.2%
  • C++ 2.1%
  • Other 0.8%