nxeu/nerune-engine
1
0
Fork
You've already forked nerune-engine
0
A visual novel engine built with Rust + wgpu, powered by the neru scripting language.
  • Rust 98%
  • WGSL 2%
Naruse Nia 458fc0efd1
Some checks failed
CI / rustfmt (push) Successful in 35s
CI / clippy (push) Failing after 2m27s
CI / test (push) Successful in 2m54s
CI / ci (push) Failing after 3s
fix: add font_family arg to draw_text
2026年06月15日 18:20:50 +09:00
.forgejo/workflows chore: switch CI to mise-action, rename to mise.toml 2026年06月08日 10:51:34 +09:00
assets feat: text engine 2026年06月15日 17:10:43 +09:00
crates fix: add font_family arg to draw_text 2026年06月15日 18:20:50 +09:00
docs/specification chore: uncheck texture atlas 2026年06月15日 02:51:53 +09:00
.gitignore feat: add CI, mise tasks, rustfmt and clippy config 2026年06月08日 10:08:38 +09:00
Cargo.lock feat: draw text 2026年06月15日 18:17:18 +09:00
Cargo.toml feat: text engine 2026年06月15日 17:10:43 +09:00
clippy.toml feat: add CI, mise tasks, rustfmt and clippy config 2026年06月08日 10:08:38 +09:00
LICENSE add: LICENSE 2026年06月08日 04:03:58 +09:00
mise.toml feat: simple window 2026年06月08日 19:21:38 +09:00
README.md docs: add npack alt ext 2026年06月08日 04:39:13 +09:00
README_ja.md docs: add npack alt ext 2026年06月08日 04:39:13 +09:00
rustfmt.toml feat: add CI, mise tasks, rustfmt and clippy config 2026年06月08日 10:08:38 +09:00

Nerune Engine

nerune-engine logo

A visual novel engine built with Rust + wgpu, powered by the neru scripting language.

日本語版 README

Warning

This project is under active development. APIs are subject to breaking changes without notice. Do not use in production.

Overview

nerune-engine is a runtime engine for neru — a two-layer scripting language designed for visual novels. The engine interprets events emitted by the neru VM (text display, visual effects, choices, audio, etc.) and renders them using wgpu.

The neru scripting language (neru-rs) is included in this repository as a Cargo workspace crate.

Tech Stack

Component Crate
Language Rust
Graphics wgpu
Windowing winit
Audio kira
Text Rendering cosmic-text
Debug UI egui (egui-wgpu)
Serialization serde + rmp-serde (MessagePack)
Scripting neru-rs (workspace crate)

All dependencies are pure Rust — zero C dependencies for simplified builds and cross-compilation.

Features

Rendering

  • Batch-rendered 2D sprite system
  • Background and character sprite management with layering
  • WGSL shader-based transitions (fade, dissolve, wipe, custom)
  • Custom post-processing pipeline (blur, vignette, color grading)
  • GPU compute particle system (snow, rain, sakura, etc.)
  • Rich text with inline tags ([b], [color], [shake], etc.)

Audio

  • BGM / SE / Voice playback with independent tracks (kira)
  • Fade-in, fade-out, crossfade, tweening, effect chains
  • Supported formats: OGG Vorbis, MP3, WAV

Video

  • WebM (VP9 + Opus) playback for OP/ED movies and cutscenes

UI

  • Built-in UI components (message window, choices, menus, config)
  • .nerui (.nui) styling DSL with Flexbox-like layout
  • Theme variables and state transitions
  • egui integration for development/debug

Game Systems

  • Save / Load with MessagePack serialization (serde)
  • Backlog with jump-back support
  • Read/unread tracking and skip control
  • CG gallery and scene recollection
  • Flowchart visualization of scenario branches

Developer Experience

  • Hot reload for scripts, assets, and UI styles (notify crate)
  • Dev mode with direct directory asset loading
  • Crash reports with stack traces (panic hook)
  • egui debug inspector (scene, VM state, performance)

Accessibility

  • Screen reader support (OS accessibility API)
  • Full keyboard navigation
  • Adjustable font size and text speed

Project Structure

nerune-engine/
 Cargo.toml # Workspace definition
 crates/
 neru-core/ # Compiler, VM, AST, bytecode
 neru-cli/ # neru CLI tool (compile / run / build)
 nerune-renderer/ # wgpu renderer
 nerune-audio/ # kira audio
 nerune-text/ # cosmic-text text rendering
 nerune-ui/ # UI system + .nerui (.nui) parser
 nerune-engine/ # Integration crate (entry point)
 docs/
 specification/
 requirements.md # Requirements specification
 implementation-plan.md # Implementation plan

Build from Source

Requires Rust (stable).

cargo build # Build
cargo run # Build and run
cargo test # Run all tests

Game Project Structure

my_game/
 neru.toml # Project configuration
 scripts/ # Scenario files (.neru / .nr)
 logic/ # Logic files (.nerul / .nl)
 themes/ # UI styles (.nerui / .nui)
 assets/
 bg/ # Backgrounds
 character/ # Character sprites
 bgm/ # Music
 se/ # Sound effects
 voice/ # Voice files
 video/ # Movies (WebM)

Roadmap

Phase Status Description
1. Window + Renderer Planned winit window, wgpu init, sprite batch renderer
2. Sprite + Text Planned Texture loading, sprite drawing, cosmic-text
3. neru VM Integration Planned neru-core crate, VM hosting, event dispatch
4. Audio Planned kira integration, BGM/SE/voice, mixer
5. UI System Planned Message window, choices, menus, .nerui (.nui) parser
6. Effects + Particles Planned WGSL transitions, post-process, GPU particles
7. Save/Load + History Planned Save system, backlog, CG gallery, flowchart
8. Distribution Planned .npack (.npk) build, cross-compile, crash reports, video
9. Polish Planned Accessibility, DPI, config screen, optimization

License

MIT