Move the BBCode reader and the Twemoji archive into voelin-ui-vm

Both are pure (no Slint): vm/bbcode.rs and emoji.rs with their tests and
the packed archive (assets/twemoji.bin, with its license note; the
packing script writes it there). voelin-ui keeps the paths
crate::vm::bbcode and crate::emoji as re-exports until the callers move.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-20 09:15:44 +03:00
1 parent 4dc8272c64
commit 8e6838a00f
12 files changed
+29 -21

No files matched your search

+3 -3
View File
@@ -2,7 +2,7 @@
"""Pack the Twemoji SVGs into one compressed archive for the UI.
Colour emoji cannot go through the software renderer's text path, so the UI
shows them as images: `crates/voelin-ui/src/emoji.rs` reads this archive
shows them as images: `crates/voelin-ui-vm/src/emoji.rs` reads this archive
(embedded in the binary) and decodes single emoji on demand.
Usage:
@@ -11,7 +11,7 @@ Usage:
The package is @twemoji/svg (15.0.0: `npm pack @twemoji/svg`, unpacked); the
directory holds the SVGs named by code points (`1f600.svg`,
`1f468-200d-1f4bb.svg`). `out` defaults to
crates/voelin-ui/assets/twemoji.bin. Only the Python standard library is
crates/voelin-ui-vm/assets/twemoji.bin. Only the Python standard library is
needed; names come from its `unicodedata` plus a table for the emoji newer
than it (Unicode 15), so any Python 3.11+ gives the same file.
@@ -247,7 +247,7 @@ def main():
sys.exit(2)
src = sys.argv[1]
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
out = sys.argv[2] if len(sys.argv) > 2 else os.path.join(root, "crates/voelin-ui/assets/twemoji.bin")
out = sys.argv[2] if len(sys.argv) > 2 else os.path.join(root, "crates/voelin-ui-vm/assets/twemoji.bin")
items = []
for file in os.listdir(src):
if not file.endswith(".svg"):