Any good way to bundle the web part? #490
Replies: 3 comments 2 replies
-
I tend to embed in the binary itself. Some languages (Nim, Zig, Go (there may be others, those are just the languages that I have experience with) have builtin ways to do that and use the handler function to display them. The most cross platform way for C/C++ is to create a char array in a header file (downside to this is that the it adds significantly to the binary, for instance what is an originally a 200kb picture can end up being a 5MB in the program). Could also use ld from GCC to link them as object files and embed them that way. I've even just used base64 in variables to store them (still a hit size wise, but nothing like header approach). I have not really done the archive approach. As long as the final binary isn't astronomical in size, I prefer the embed in binary approach myself, but that could just be me. |
Beta Was this translation helpful? Give feedback.
-
I'm mainly using zig which has |
Beta Was this translation helpful? Give feedback.
-
In C, you can use this example: It has a simple Python script that automatically create a C header file of all the project's files. |
Beta Was this translation helpful? Give feedback.
-
Is there any "official" or good way to bundle the whole project in something like an archive (like electron does) or even inside the binary itself? I do know about the file handler function on webui but building my own bundler seems like a lot of work.
Beta Was this translation helpful? Give feedback.
All reactions