diff mrjunejune/README.md @ 244:b8aa08503378

[tools] Add sandboxed online LaTeX editor Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Mon, 03 Aug 2026 16:56:25 -0700
parents 543df0fe7168
children 70f2a3dafc1c
line wrap: on
line diff
--- a/mrjunejune/README.md	Mon Aug 03 15:26:44 2026 -0700
+++ b/mrjunejune/README.md	Mon Aug 03 16:56:25 2026 -0700
@@ -39,6 +39,25 @@
 bazel test //mrjunejune/test:theme_and_webp_test
 ```
 
+## LaTeX editor
+
+`/tools/latex_editor` sends source to the C server, which compiles it with the
+host's `/usr/bin/pdflatex` and returns the PDF directly to the browser. Install
+TeX Live on production hosts before deploying:
+
+```bash
+sudo apt-get install texlive-latex-base texlive-latex-recommended
+```
+
+The compiler child uses restricted TeX file access, Linux Landlock, a seccomp
+network filter, and CPU, memory, file-size, process, and wall-clock limits.
+Compilation fails closed when the Linux sandbox cannot be applied.
+
+```bash
+bazel test //mrjunejune/test:latex_renderer_test
+bazel test //mrjunejune/test:latex_editor_test
+```
+
 ## TODO 
 
 - Add caching layer