1
#include "envoy/registry/registry.h"
2

            
3
#include "source/extensions/common/wasm/wasm_runtime_factory.h"
4

            
5
#include "include/proxy-wasm/v8.h"
6

            
7
namespace Envoy {
8
namespace Extensions {
9
namespace Common {
10
namespace Wasm {
11

            
12
class V8RuntimeFactory : public WasmRuntimeFactory {
13
public:
14
302
  WasmVmPtr createWasmVm() override { return proxy_wasm::createV8Vm(); }
15

            
16
96
  std::string name() const override { return "envoy.wasm.runtime.v8"; }
17
};
18

            
19
#if defined(PROXY_WASM_HAS_RUNTIME_V8)
20
REGISTER_FACTORY(V8RuntimeFactory, WasmRuntimeFactory);
21
#endif
22

            
23
} // namespace Wasm
24
} // namespace Common
25
} // namespace Extensions
26
} // namespace Envoy