mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ 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:
14
warp-input.Dockerfile
Normal file
14
warp-input.Dockerfile
Normal 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
|
||||
Reference in New Issue
Block a user