Skip to content

Develop plugins and app features ​

What is Rhai? ​

Rhai is a scripting language designed to run inside Rust applications. Its syntax resembles JavaScript and Rust, with functions, variables, arrays, and maps. Aikatsu source plugins are plain text files with a .rhai extension.

Aikatsu runs these scripts and supplies functions for fetching pages, parsing HTML and JSON, and resolving video URLs. You don't need to install a separate Rhai interpreter. The engine is included in the app and the plugin CLI.

Why Aikatsu uses it ​

Anime sites change their page layouts and video links. Keeping each site's search and playback logic in a script lets its author fix and publish that source without rebuilding Aikatsu. Users install the updated plugin separately from app updates.

The shared Rust core runs the same scripts on desktop and Android. The CLI uses that engine too, so you can test a plugin before loading it into either app. Each source implements four required functions: search, episodes, heights, and stream.

What you need installed ​

What you want to work onWhat to prepare
Source pluginsA text editor, an Aikatsu checkout, and Rust with the native tools needed to build the plugin CLI. Follow the plugin setup.
Shared Rust coreThe same Rust build environment. Qt and Flutter are needed when you build their respective interfaces.
Desktop appRust, Qt, libmpv development files, and your platform's C/C++ build tools. See the app build guide.
Android appRust, Flutter, a JDK, and the Android SDK/NDK toolchain. See the Android setup.
DocumentationNode.js 22.12 or newer and npm. See the docs setup.

For plugin work, familiarity with HTML, CSS selectors, HTTP requests, and JSON will help you read a site's responses. The Rhai book covers the language itself. Aikatsu's extra functions are in the host API reference.

If you're adding a site ​

Start with your first plugin. It walks through a small repo you can copy, run offline, and adapt to a real site.

Use these references as you work:

If you're changing the app ​

The app build guide covers the shared core, both interfaces, and their build commands.

Most shared behavior lives in core/. Desktop and mobile talk to it through JSON methods and receive events. Fix site layout changes in the plugin. Add host functions and player features in the app.

These docs describe the current host API, API 1. A plugin's api field is separate from Aikatsu's app version and your plugin's own version number.

Aikatsu is free software, licensed under GPL-3.0.