Mercurial
annotate mrjunejune/main.py @ 282:6bd4a3990696 default tip
Add cross-platform canvas orchestration and typed composer
Enable native ARM dependencies, macOS Copilot orchestration, portable service supervision, CPU dictation, and a shared N-key speak-or-type composer.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Thu, 20 Aug 2026 20:45:25 -0700 |
| parents | d2bb317e01db |
| children |
| rev | line source |
|---|---|
|
41
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
1 from cffi import FFI |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
2 import os |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
3 |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
4 ffi = FFI() |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
5 ffi.cdef("void start_server(void);") |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
6 |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
7 # Bazel runs binaries from a sandbox, so use runfiles to locate the .so |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
8 import pathlib |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
9 runfiles_dir = pathlib.Path(__file__).parent |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
10 libpath = runfiles_dir / "mrjunejune_server_so.so" |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
11 |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
12 C = ffi.dlopen(str(libpath)) |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
13 C.start_server() |
|
d2bb317e01db
[Experiment] Calling seobeo in a python server and see.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
14 |