| Crates.io | inyanga |
| lib.rs | inyanga |
| version | 0.1.1 |
| created_at | 2025-10-12 16:50:29.193186+00 |
| updated_at | 2025-10-12 16:54:43.99395+00 |
| description | Axum/mlua based server-side lua scripting |
| homepage | |
| repository | https://github.com/KonradNoTantoo/Inyanga |
| max_upload_size | |
| id | 1879446 |
| size | 52,024 |
Inyanga is a Rust™ crate that allows embedding Lua scripts inside HTML, making it easy to create dynamic web pages using Lua. It enables interpreting Lua code directly within HTML pages, similar to how PHP works.
Technically, Inyanga is a layer of paste between the Axum web framework and the mlua crate for Lua integration in Rust™.
It works as a Layer, to simplify integration of Lua-powered HTML rendering into an Axum application.
Inyanga will interpret the <?lua .. ?> block from the following HTML code:
<!DOCTYPE html>
<html>
<head>
<title>Inyanga Example</title>
</head>
<body>
<h1>Hello from Lua!</h1>
<?lua
for i = 1, 5 do
?><p><?lua echo("Number: " .. i)?><p><?lua
end
?>
</body>
</html>
Example server (including exposure of Rust™ callbacks to Lua code) can be found in examples/server.rs.
WTFPL-2