The first executable form of our host requirements. Until now a machine was
qualified by a human reading a table of hard requirements, and a requirement
nothing can check is one that is silently optional.
It also replaces a form. Every field we wanted from a prospective host --
upstream, latency under load, spare disk, hours powered, library size, play
hours -- is measurable, and most of them cannot be answered honestly by a
human anyway: almost nobody knows their real upstream and essentially nobody
has seen their own bufferbloat figure. What is left for the questions is only
what a machine cannot know: intent, and what someone already pays.
What it does
- Checks every hard requirement: /dev/kvm, an AMD or Intel GPU with a DRM
render node, VK_KHR_video_encode_queue plus a codec, virglrenderer, the
two stores, the io cgroup controller, virtiofsd. Pass/fail/unknown, and
unknown is never collapsed into fail -- a machine we could not ask is not
a machine that failed.
- Measures upstream and, the point of the whole thing, added latency under
load. Grade bands come from the frame budget rather than convention: the
network allowance is ~40 ms because render, encode, decode, display and
jitter buffer have already spent ~58 ms.
- Reads Steam, only with an explicit yes, for library size and shape and an
hour-of-day histogram of launches -- one sample per title, which is a real
distribution obtained without asking.
- Asks at most five questions, branched, all skippable.
No server
Nothing is uploaded and no telemetry endpoint exists. The network test talks
to Cloudflare's public sink and to 1.1.1.1, neither of which is ours. Output
is a line on the terminal that the person may choose to paste. The line
carries no hostname, IP, username, game title or path -- a size band rather
than a size, hours rather than dates. The long version stays in a local
JSON file.
Three bugs found by running it, all of which would have produced wrong data
- vulkaninfo --summary lists ZERO VK_KHR_video entries where full vulkaninfo
lists five on the same machine. Preferring the summary reported "not
advertised" on a card that advertises it -- a false negative on the check
most likely to disqualify a host.
- btrfs subvolumes were counted as separate disks: /, /home and /srv each
reported 91 GiB of one 91 GiB device. Deduped by backing device, which the
two-stores check needs anyway since it wants separate devices.
- Proton and the Steam Linux Runtimes are installed like games and are not
games. Five of eight entries on the test machine, so the title count was
5x too high and the library-shape question was corrupted.
And one finding about the development connection, now encoded as a verdict:
178 ms idle RTT, served from Johannesburg. That machine passes every other
check and cannot host for a European player, because it is distance and no
upgrade shortens it. HOST-READY-LOCAL exists for exactly that case -- and it
is the coverage argument from the other end: somewhere with no nearby edge is
somewhere a local host is the only option anyone has.
Dependencies are four, three of them serde/clap/anyhow. The VDF parser, every
platform probe and the text wrapping are in-tree: a binary handed to strangers
has a dependency tree that is part of its interface.
The component nescapture, neswire and nescope all talk to, and the only
thing in the guest that speaks to the client. It muxes their frames into
one iroh QUIC endpoint and fans input back.
Renamed from nestri-guest-hub, which named a location rather than a job.
Four files came across unchanged -- session.rs, ipc_listener.rs,
ticket.rs, screenshot.rs. Between them they mention Steam zero times, and
they import only nesprotocol's open modules; the control feature carrying
LaunchIntent and SteamIdentity is used exclusively by the three files that
are staying closed. The two clusters shared a main.rs and nothing else, so
there was no untangling to do -- only a cut.
main.rs loses --proton, --steamclient-so, --root and the game uid/gid,
and no longer ends by handing the process to a controller. It runs until
it is stopped. Deciding when the box is finished belongs to nesinit.
The ticket used to leave via that controller, so it needed a new way out:
neshub now serves it on a socket and nesinit dials for it. Listening
rather than dialling matches every other socket here and means no startup
ordering to get wrong.
Three tests, where there were none -- the ticket crosses a process
boundary as text now, so a round trip that drops a field would otherwise
be found by whoever cannot connect.
A Vulkan implicit layer that captures frames from inside the workload's own
process and encodes them on the GPU they were drawn on. Fourth and last of this
batch, imported as a tree from `nestrilabs/nescapture` on the same terms.
Filed under `apps/` rather than `crates/` despite building a cdylib. The rule
here is what a thing *is*, not what it compiles to: this is a finished artefact
that gets installed into an image beside its layer manifest, not a library
another crate in this tree depends on. `crates/` is for the latter, and putting
this there would make the distinction useless the first time someone looked.
Wired to the workspace, `nesprotocol` by path. Its description named the
transport component; that reads better as what it actually is — where the frames
go — so it says that instead.
Whole workspace builds and tests: 21 across four members.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Captures a session's audio and hands it to the transport over a local socket.
Third component in, imported as a tree from `nestrilabs/neswire` on the same
terms as the previous two.
Wired to the workspace, `nesprotocol` by path. 4 tests pass.
`bin/hub-stub.rs` is a stand-in for the transport's listener, which is what lets
this be developed and tested without the rest of a box existing. It names the
transport by its old name, and is left for the rename commit along with the two
in the compositor.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A headless Wayland compositor for a single fullscreen client, and the second
component into this repo. Imported as a tree from `nestrilabs/nescope` for the
same reason as the last one: the upstream repo is private, its history has never
been reviewed for publication, and a squash is what keeps that history from
becoming permanent here.
Wired to the workspace — versions from the root, `nesprotocol` by path instead
of a sibling directory. 8 tests pass.
It knows a lot about Steam, and all of it stays. `steam_app_*` window classes,
a launcher that exits before the game it started, a client that shows a login
screen with no Vulkan frames in it: that is third-party behaviour a compositor
for games has to handle, and describing it reveals nothing about how we are put
together. The rule is about topology, not vocabulary.
Two comments still name the transport by its old name and are left for the
commit that renames it, so that rename reads as one change rather than as
noise spread across four imports.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
First component into this repo. Renamed from `nestri-protocol` — everything
else in the family carries the `nes` prefix and this was the odd one out.
**Imported as a tree, not as history.** The upstream repo is private, so its
commits and commit messages have never been reviewed for what may be published,
and squashing avoids the failure this project has already documented once: a
repo published wholesale carries private history with it, permanently. Origin is
`nestrilabs/nestri-protocol`, and this is its state today rather than its past.
The `control` module is deliberately left behind. It carries the host↔guest
control channel, and its types are shaped by a payload that has no business
being described in a public repo — a box is supposed to be able to run anything.
It was already an optional feature that nothing here enables, so leaving it out
costs nothing today and stops a boundary from being crossed by accident.
What lands is the media protocol: frames, audio, cursor, input and stats. One
definition shared by both ends, so no two can drift silently. 9 tests pass.
One pre-existing clippy warning (`input.rs`, too many arguments) is left alone
on purpose — an import commit should be a faithful copy, and mixing a cleanup
into one makes both harder to read.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replace json protocol by protobuf
generate protobuf files with `bun buf generate` or just `buf generate`
- [x] Implement all datatypes with proto files
- [x] Map to ts types or use the generated proto types directly with:
- [x] web frontend
- [x] relay
- [x] runner
- [ ] final performance test (to be done when CI builds new images)
---------
Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This adds:
- [x] Keyboard and mouse handling on the frontend
- [x] Video and audio streaming from the backend to the frontend
- [x] Input server that works with Websockets
Update - 17/11
- [ ] Master docker container to run this
- [ ] Steam runtime
- [ ] Entrypoint.sh
---------
Co-authored-by: Kristian Ollikainen <14197772+DatCaptainHorse@users.noreply.github.com>
Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>