<commit_before>syntax = "proto3";

package envoy.extensions.wasm.v3;

import "envoy/config/core/v3/base.proto";

import "google/protobuf/any.proto";

import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.wasm.v3";
option java_outer_classname = "WasmProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Wasm]
// [#extension: envoy.bootstrap.wasm]

// Configuration for a Wasm VM.
// [#next-free-field: 7]
message VmConfig {
  // An ID which will be used along with a hash of the wasm code (or the name of the registered Null
  // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
  // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
  // reduce memory utilization and make sharing of data easier which may have security implications.
  // See ref: "TODO: add ref" for details.
  string vm_id = 1;

  // The Wasm runtime type (either "v8" or "null" for code compiled into Envoy).
  string runtime = 2 [(validate.rules).string = {min_len: 1}];

  // The Wasm code that Envoy will execute.
  config.core.v3.AsyncDataSource code = 3;

  // The Wasm configuration used in initialization of a new VM
  // (proxy_on_start). `google.protobuf.Struct` is serialized as JSON before
  // passing it to the plugin. `google.protobuf.BytesValue` and
  // `google.protobuf.StringValue` are passed directly without the wrapper.
  google.protobuf.Any configuration = 4;

  // Allow the wasm file to include pre-compiled code on VMs which support it.
  // Warning: this should only be enable for trusted sources as the precompiled code is not<commit_msg>wasm: use static registration for runtimes (#14014)<commit_after>syntax = "proto3";

package envoy.extensions.wasm.v3;

import "envoy/config/core/v3/base.proto";

import "google/protobuf/any.proto";

import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.wasm.v3";
option java_outer_classname = "WasmProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Wasm]
// [#extension: envoy.bootstrap.wasm]

// Configuration for a Wasm VM.
// [#next-free-field: 7]
message VmConfig {
  // An ID which will be used along with a hash of the wasm code (or the name of the registered Null
  // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same
  // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can
  // reduce memory utilization and make sharing of data easier which may have security implications.
  // See ref: "TODO: add ref" for details.
  string vm_id = 1;

  // The Wasm runtime type.
  // Available Wasm runtime types are registered as extensions. The following runtimes are included
  // in Envoy code base:
  //
  // .. _extension_envoy.wasm.runtime.null:
  //
  // **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the
  // Envoy binary. The registered name is given in the *code* field as *inline_string*.
  //
  // .. _extension_envoy.wasm.runtime.v8:
  //
  // **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime.
  //
  // .. _extension_envoy.wasm.runtime.wavm:
  //
  // **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-based WebAssembly runtime.
  // This runtime is not enabled in the official build.
  //
  // .. _extension_envoy.wasm.runtime.wasmtime:
  //
  // **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime.
  // This runtime is not enabled in the official build.
  //
  string runtime = 2 [(validate.rules).string = {min_len: 1}];

  // The Wasm code that Envoy will execute.
  config.core.v3.AsyncDataSource code = 3;

  // The Wasm configuration used in initialization of a new VM
  // (proxy_on_start). `google.protobuf.Struct` is serialized as JSON before
  // passing it to the plugin. `google.protobuf.BytesValue` and
  // `google.protobuf.StringValue` are passed directly without the wrapper.
  google.protobuf.Any configuration = 4;

  // Allow the wasm file to include pre-compiled code on VMs which support it.
  // Warning: this should only be enable for trusted sources as the precompiled code is not
{'fraction_non_alphanumeric': 0.1108185209567698, 'fraction_numerical': 0.007022163704191354, 'mean_word_length': 3.567134268537074, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5983167', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1377, 'n_words': 498}