Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
js_engine_recommend.hpp
Go to the documentation of this file.
1#pragma once
2
4#include <string>
5#include <string_view>
6
7namespace pulp::view {
8
9// Recommendation result from analyzing a JS script or workload description
12 std::string reason;
13 bool upgrade_advised = false; // true if current engine is suboptimal
14};
15
16// Analyze JS source code and recommend the best engine.
17// Checks for patterns like Three.js imports, large script size, etc.
18// `current` is the engine currently in use — if it matches the recommendation,
19// upgrade_advised will be false.
21 std::string_view js_source,
23
24// Recommend engine for a named workload (e.g., "threejs", "standard-ui", "apple-only")
26 std::string_view workload,
28
29} // namespace pulp::view
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
JsEngineType
Definition js_engine.hpp:59
@ quickjs
Definition js_engine.hpp:60
EngineRecommendation recommend_engine_for_workload(std::string_view workload, JsEngineType current=JsEngineType::quickjs)
EngineRecommendation recommend_engine_for_script(std::string_view js_source, JsEngineType current=JsEngineType::quickjs)
Definition js_engine_recommend.hpp:10
std::string reason
Definition js_engine_recommend.hpp:12
bool upgrade_advised
Definition js_engine_recommend.hpp:13
JsEngineType recommended
Definition js_engine_recommend.hpp:11