feat(input): Migrate to moq for input transmission (#38)

## Description

**What issue are you solving (or what feature are you adding) and how
are you doing it?**

We cannot use golang for our input binary as we will be redoing the
Webtransport stack, plus we will have to use CGO in-order to hook into
X11. Like what [neko](https://github.com/m1k1o/neko) does.

However, we could go down the Rust route, where X11 mouse/keyboard
drivers are in pretty, and moq-rs (the MoQ library using Webtransport)
works really well. So, that is what am trying to do here; implement
input using rust.
This commit is contained in:
Wanjohi
2024-05-18 01:51:35 +03:00
committed by GitHub
parent 3a7d404a26
commit c0f573599f
10 changed files with 2265 additions and 10 deletions

14
warp-input.Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:bookworm as builder
# Create a build directory and copy over all of the files
WORKDIR /build
COPY ./bin/input/ ./
RUN apt-get update && apt-get install -y libxdo-dev
# Reuse a cache between builds.
# I tried to `cargo install`, but it doesn't seem to work with workspaces.
# There's also issues with the cache mount since it builds into /usr/local/cargo/bin
# We can't mount that without clobbering cargo itself.
# We instead we build the binaries and copy them to the cargo bin directory.
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/build/target \
cargo build --target x86_64-unknown-linux-gnu --release && cp target/x86_64-unknown-linux-gnu/release/warp-input /usr/bin/warp-input