ui : embed assets directly with CMake (#28445)
Remove the build-time C++ helper and external gzip dependency, simplifying cross-compilation. Keep the generated C++ in templates for readability and preserve fully embedded UI assets. Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Generated by scripts/ui-assets.cmake - do not edit.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
// Defined as 1 only when assets were embedded (tools/server checks defined()).
|
||||
#cmakedefine LLAMA_UI_HAS_ASSETS 1
|
||||
|
||||
struct llama_ui_asset {
|
||||
std::string name;
|
||||
const unsigned char * data;
|
||||
std::size_t size;
|
||||
std::string etag;
|
||||
std::string type;
|
||||
};
|
||||
|
||||
const llama_ui_asset * llama_ui_find_asset(const std::string & name);
|
||||
bool llama_ui_use_gzip();
|
||||
const std::array<llama_ui_asset, @N_ASSETS@> & llama_ui_get_assets();
|
||||
Reference in New Issue
Block a user