Mercurial
view mrjunejune/main.py @ 271:13d61401c57d
redirect Copilot cache to service state
Set XDG_CACHE_HOME from the configured inference state so the systemd service can extract Copilot outside its protected home directory.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 07 Aug 2026 13:24:05 -0700 |
| parents | d2bb317e01db |
| children |
line wrap: on
line source
from cffi import FFI import os ffi = FFI() ffi.cdef("void start_server(void);") # Bazel runs binaries from a sandbox, so use runfiles to locate the .so import pathlib runfiles_dir = pathlib.Path(__file__).parent libpath = runfiles_dir / "mrjunejune_server_so.so" C = ffi.dlopen(str(libpath)) C.start_server()