A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
wasm_system_actions.h
Go to the documentation of this file.
1
// Copyright 2026 The A11 Authors
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef A11_WASM_SYSTEM_ACTIONS_H_
16
#define A11_WASM_SYSTEM_ACTIONS_H_
17
18
#include <memory>
19
#include <string>
20
21
#include <absl/container/flat_hash_map.h>
22
#include <absl/container/flat_hash_set.h>
23
#include <absl/status/status.h>
24
#include <absl/status/statusor.h>
25
26
#include "
a11/actions/registry.h
"
27
#include "
a11/actions/schema.h
"
28
29
namespace
a11::wasm
{
30
31
struct
Environment
{
32
absl::flat_hash_map<std::string, std::string>
values
;
33
absl::flat_hash_set<std::string>
allowed_names
;
34
};
35
36
absl::StatusOr<actions::ActionSchema>
SchemaFromCatalogue
(
37
std::string_view
name
);
38
absl::Status
RegisterSystemActions
(
actions::ActionRegistry
& registry,
39
std::shared_ptr<const Environment>
environment
,
40
bool
register_environment);
41
42
}
// namespace a11::wasm
43
44
#endif
// A11_WASM_SYSTEM_ACTIONS_H_
schema.h
Schemas describing an action's typed interface and its settings.
a11::actions::ActionRegistry
A thread-safe catalogue mapping action names to schema and handler.
Definition
registry.h:59
name
std::string name
The declaration name and its colon.
Definition
format.cc:50
environment
std::vector< std::string > environment
Definition
main.cc:138
a11::wasm
Definition
async_task.cc:27
a11::wasm::SchemaFromCatalogue
absl::StatusOr< actions::ActionSchema > SchemaFromCatalogue(std::string_view name)
Definition
wasm_system_actions.cc:187
a11::wasm::RegisterSystemActions
absl::Status RegisterSystemActions(actions::ActionRegistry ®istry, std::shared_ptr< const Environment > environment, bool register_environment)
Definition
wasm_system_actions.cc:239
registry.h
The action registry: a catalogue of named schema/handler pairs.
a11::wasm::Environment
Definition
wasm_system_actions.h:31
a11::wasm::Environment::allowed_names
absl::flat_hash_set< std::string > allowed_names
Definition
wasm_system_actions.h:33
a11::wasm::Environment::values
absl::flat_hash_map< std::string, std::string > values
Definition
wasm_system_actions.h:32
cpp
a11
wasm
thread
wasm_system_actions.h
Generated by
1.9.8