#screen #casting #cross-platform #implemented #android #mode #hylarana

hylarana-transport

A cross-platform screen casting library implemented by Rust

5 releases

0.2.0 Dec 1, 2024
0.2.0-beta.1 Nov 21, 2024
0.2.0-beta Nov 20, 2024
0.1.1 Nov 20, 2024
0.1.0 Nov 2, 2024

#986 in Network programming

Download history 111/week @ 2024-10-28 25/week @ 2024-11-04 1/week @ 2024-11-11 369/week @ 2024-11-18 77/week @ 2024-11-25 82/week @ 2024-12-02 20/week @ 2024-12-09

548 downloads per month
Used in 2 crates

LGPL-2.1-only

150KB
2.5K SLoC

Hylarana


A cross-platform screen casting library implemented by rust.
documentation: docs.rs
examples: rust / android



Pure software screen projection is different from Miracast, AirPlay, etc., which need to rely on hardware support. This project was not designed to work on a wide area network, but works well in a local area network environment.

The project is cross-platform, but the priority platforms supported are Windows and Android, Unlike a solution like DLAN, this project is more akin to airplay, so low latency is the main goal, currently the latency is controlled at around 150-250ms (with some variations on different platforms with different codecs), and maintains a highly easy to use API and very few external dependencies.

Unlike traditional screen casting implementations, this project can work in forwarding mode, in which it can support casting to hundreds or thousands of devices at the same time, which can be useful in some specific scenarios (e.g., all advertising screens in a building).

Build Instructions

Requirements

  • Git
  • Rust: Rust stable toolchain.
  • C++20 or above compliant compiler. (G++/Clang/MSVC)
  • CMake: CMake 3.16 or above as a build system.
  • Node.js: Node.js 16 or above as a auto build script.
  • Cargo NDK: Cargo NDK is optional and required for Android Studio projects.
Linux (Ubuntu/Debian)

For Linux, you need to install additional dependencies to build SRT and other.

sudo apt-get update
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential libasound2-dev libsdl2-dev libva-dev v4l-utils
Macos
brew install cmake ffmpeg@7

Build

Examples and SDK library files can be automatically packaged by running an automatic compilation script.

npm run build:release

The Release version is compiled by default. If you need the Debug version, just run npm run build:debug.
For android, there is no need to manually call compilation. You can directly use Android Studio to open android.

License

LGPL Copyright (c) 2024 mycrl.

Dependencies

~6–34MB
~508K SLoC