目录
下载项目
https://github.com/proxy-wasm/proxy-wasm-cpp-sdk
新建work目录
mkdir work
使用Dockerfile构建镜像
docker build -t wasmsdk:v2 -f Dockerfile-sdk .
用例代码
#include <string>
#include <string_view>
#include <unordered_map>
#include "proxy_wasm_intrinsics.h"
class ExampleRootContext : public RootContext {
public:
explicit ExampleRootContext(uint32_t id, std::string_view root_id) : RootContext(id, root_id) {}
bool onStart(size_t) override;