| 59 | } |
| 60 | |
| 61 | absl::StatusOr<std::unique_ptr<cel::Runtime>> ConfigureRuntime() { |
| 62 | cel::RuntimeOptions runtime_options; |
| 63 | // Note: this is needed to resolve net.Address as a `type` constant. |
| 64 | runtime_options.enable_qualified_type_identifiers = true; |
| 65 | absl::StatusOr<cel::RuntimeBuilder> runtime_builder = |
| 66 | cel::CreateStandardRuntimeBuilder(cel::GetMinimalDescriptorPool(), |
| 67 | runtime_options); |
| 68 | // =========================================================================== |
| 69 | // Codelab: Update runtime builder with functions from network_functions.h |
| 70 | // =========================================================================== |
| 71 | return std::move(runtime_builder).value().Build(); |
| 72 | } |
| 73 | |
| 74 | } // namespace |
| 75 | |