istio-ecosystem / wasm-extensions

Contains miscellaneous Wasm extensions for Istio
Apache License 2.0
108 stars 35 forks source link

Verify C++ Wasm extension walkthrough guide #24

Open bianpengyuan opened 3 years ago

bianpengyuan commented 3 years ago

We recently added a walk through guide for C++ Wasm extension development: https://github.com/istio-ecosystem/wasm-extensions/blob/master/doc/write-a-wasm-extension-with-cpp.md. Before sharing it more broadly, it would be great if we can get some feedback about it internally from folks who do not work on writing Wasm extensions day by day.

@douglas-reid @richardwxn It would be really nice if you could please take a look it. Thanks!

bianpengyuan commented 3 years ago

cc @mandarjog

klarose commented 3 years ago

Thanks for putting this together! I've been trying to walk through this myself. I'm running into a few issues:

  1. The .bazelversion in the example repo does not always align with the version in the upstream istio repo where we fetch the latest envoy hashes as part of get-dep.sh. This leads to the script silently failing.
  2. The WORKSPACE file is insufficent: it does not load some of the required modules. Perhaps it'd be better to just point to the example.wasm one?
  3. I cannot get the integration test (example/test/example_test.go) to run. It cannot import the test module from this repo, which makes me suspect it intends to run as part of this repo. Since the walkthrough is geared towards somebody working in their own repo, it'd be helpful to either describe how to modify this file for your local repo, or move any test scaffolding out into its own go module.
  4. I had to add a go.mod to the root of my repo to even start running the integration test. I've never really worked in a mixed cpp/golang env before, so I'm not sure if that's necessary or normal (is there a better way to initialise the dependencies?)