25#include <TargetConditionals.h>
59#if defined(__ANDROID__)
61#elif defined(__EMSCRIPTEN__)
63#elif defined(__APPLE__) && TARGET_OS_IPHONE
72[[nodiscard]]
constexpr GeneratedDeviceAdmission
86 return {
true,
false,
true};
89 return {
true,
false,
false};
95 return {supported,
false,
false};
100 return {supported, supported,
false};
104 return {supported,
false,
false};
110 return {supported,
false,
false};
234 std::unique_ptr<Impl> impl_;
Definition node_pack.hpp:215
friend NodePackLoadResult load_verified_node_pack(VerifiedNodePackBinary, const NodePackManifest &, const NodePackTrust &, const NodePackHostPolicy &)
friend NodePackVerifyResult verify_node_pack_binary(const std::string &, const NodePackManifest &)
const std::string & path() const
~VerifiedNodePackBinary()
VerifiedNodePackBinary(VerifiedNodePackBinary &&) noexcept
const std::string & sha256_hex() const
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
constexpr GeneratedDeviceAdmission generated_device_admission(GeneratedDevicePlatform platform, GeneratedDeviceArtifact artifact, GeneratedDeviceOrigin origin) noexcept
Returns the platform policy before any executable artifact is opened.
Definition node_pack.hpp:73
constexpr GeneratedDevicePlatform build_generated_device_platform() noexcept
Definition node_pack.hpp:58
bool parse_node_pack_manifest(const std::string &json, NodePackManifest &out)
GeneratedDeviceArtifact
Definition node_pack.hpp:37
@ NativePack
Definition node_pack.hpp:40
@ FrozenAudio
Definition node_pack.hpp:42
@ DeclarativeGraph
Definition node_pack.hpp:38
@ GeneratedUi
Definition node_pack.hpp:44
@ WebAssembly
Definition node_pack.hpp:41
@ Recipe
Definition node_pack.hpp:43
@ InterpretedProgram
Definition node_pack.hpp:39
GeneratedDevicePlatform
Definition node_pack.hpp:30
@ Desktop
Definition node_pack.hpp:31
@ Ios
Definition node_pack.hpp:33
@ Web
Definition node_pack.hpp:34
@ Android
Definition node_pack.hpp:32
NodePackError
Definition node_pack.hpp:169
@ HashMismatch
Definition node_pack.hpp:174
@ ManifestInvalid
Definition node_pack.hpp:171
@ NodeMetadataMismatch
Definition node_pack.hpp:179
@ LoadFailed
Definition node_pack.hpp:176
@ BinaryChanged
Definition node_pack.hpp:181
@ Ok
Definition node_pack.hpp:170
@ UnsupportedRequirements
Definition node_pack.hpp:178
@ UntrustedSigner
Definition node_pack.hpp:172
@ BadSignature
Definition node_pack.hpp:173
@ PlatformPolicyDenied
Definition node_pack.hpp:180
@ AbiMismatch
Definition node_pack.hpp:175
@ SymbolMissing
Definition node_pack.hpp:177
void unload_node_pack(void *handle)
NodePackLoadResult load_node_pack(const std::string &manifest_dir, const NodePackManifest &manifest, const NodePackTrust &trust)
std::vector< std::uint8_t > node_pack_signed_message(const NodePackManifest &m)
GeneratedDeviceOrigin
Definition node_pack.hpp:47
@ AppBundled
Definition node_pack.hpp:48
@ RuntimeDownloaded
Definition node_pack.hpp:49
@ Ok
Definition baked_graph_processor.hpp:156
@ PULP_NODE_CAP_LATENCY_V1
Definition pulp_node_v1.h:78
@ PULP_NODE_CAP_STATE_V1
Definition pulp_node_v1.h:75
@ PULP_NODE_CAP_EVENTS_V1
Definition pulp_node_v1.h:77
@ PULP_NODE_CAP_RESET_V1
Definition pulp_node_v1.h:76
Definition node_pack.hpp:52
bool requires_separate_origin
Definition node_pack.hpp:54
bool universal_fallback_part
Definition node_pack.hpp:55
bool allowed
Definition node_pack.hpp:53
Definition node_pack.hpp:116
std::string type_id
Definition node_pack.hpp:117
std::uint32_t capabilities
Definition node_pack.hpp:118
Definition node_pack.hpp:156
std::uint64_t max_persistent_bytes
Definition node_pack.hpp:163
bool allow_audio_thread_allocations
Definition node_pack.hpp:161
std::uint32_t max_block_size
Definition node_pack.hpp:162
std::uint64_t max_scratch_bytes
Definition node_pack.hpp:164
GeneratedDeviceOrigin origin
Definition node_pack.hpp:166
GeneratedDevicePlatform platform
Definition node_pack.hpp:165
bool require_realtime_safe
Definition node_pack.hpp:160
std::uint32_t supported_capabilities
Definition node_pack.hpp:157
Definition node_pack.hpp:184
const pulp_node_entry_v1 * entry
Definition node_pack.hpp:186
void * handle
Definition node_pack.hpp:187
bool ok() const
Definition node_pack.hpp:188
NodePackError error
Definition node_pack.hpp:185
Definition node_pack.hpp:137
std::vector< NodePackResource > resources
Definition node_pack.hpp:145
std::uint32_t abi_major
Definition node_pack.hpp:139
std::vector< NodePackEntry > nodes
Definition node_pack.hpp:144
std::vector< std::uint8_t > signer_public_key
Definition node_pack.hpp:142
std::string binary
Definition node_pack.hpp:140
std::string sha256_hex
Definition node_pack.hpp:141
std::string pack_id
Definition node_pack.hpp:138
std::vector< std::uint8_t > signature
Definition node_pack.hpp:143
NodePackRuntimeRequirements requirements
Definition node_pack.hpp:146
Definition node_pack.hpp:121
bool required
Definition node_pack.hpp:125
std::string kind
Definition node_pack.hpp:123
std::string sha256_hex
Definition node_pack.hpp:124
std::string id
Definition node_pack.hpp:122
Definition node_pack.hpp:128
std::uint64_t persistent_bytes
Definition node_pack.hpp:132
bool realtime_safe
Definition node_pack.hpp:129
std::uint64_t scratch_bytes
Definition node_pack.hpp:133
std::uint32_t max_block_size
Definition node_pack.hpp:131
bool audio_thread_allocations
Definition node_pack.hpp:130
Definition node_pack.hpp:152
std::vector< std::vector< std::uint8_t > > trusted_public_keys
Definition node_pack.hpp:153
Definition node_pack.hpp:243
NodePackError error
Definition node_pack.hpp:245
VerifiedNodePackBinary binary
Definition node_pack.hpp:246
Definition pulp_node_v1.h:161