| Crates.io | nemu |
| lib.rs | nemu |
| version | 0.1.0 |
| created_at | 2025-10-25 15:01:27.889611+00 |
| updated_at | 2025-10-25 15:01:27.889611+00 |
| description | An interactive story engine for creating text-based adventure games |
| homepage | |
| repository | https://github.com/loveucifer/nemu |
| max_upload_size | |
| id | 1900316 |
| size | 109,805 |
A complete text-based adventure game framework in Rust. Create, play, and share interactive stories with rich narratives and inventory systems.
Build the project:
cargo build --release
Create a new adventure:
./target/release/nemu create my_adventure
Play the adventure:
./target/release/nemu play my_adventure/my_adventure.toml
Try in-game commands like:
look - examine your surroundingsgo north - move in a directiontake key - pick up itemsinventory - check your items# Clone the repository
git clone https://github.com/yourusername/nemu.git
cd nemu
# Build the project
cargo build --release
# The binary will be available as 'nemu' in target/release/
# Create a new story template
./target/release/nemu create my-adventure
# Validate a story file
./target/release/nemu validate my-adventure.toml
# Play a story
./target/release/nemu play my-adventure.toml
Once playing a story, use these commands:
look - Look around the current roomgo [direction] - Move in a direction (north, south, east, west)n/s/e/w - Short forms for directionstake [item] - Pick up an itemdrop [item] - Drop an iteminventory - Check your inventoryhelp - Show available commandsquit - Exit the gameStories are written in TOML format. Here's an example:
[story]
title = "The Mysterious Forest"
start_room = "forest_entrance"
[rooms.forest_entrance]
title = "Dark Forest Entrance"
description = "You stand at the edge of a dark forest. Ancient trees loom overhead."
exits = { north = "deep_forest", east = "clearing" }
items = ["stick"]
[rooms.deep_forest]
title = "Deep in the Forest"
description = "Thick branches block most sunlight. You hear mysterious sounds."
exits = { south = "forest_entrance" }
items = ["mushroom", "berries"]
[items.stick]
name = "wooden stick"
description = "A sturdy stick that might be useful."
[items.mushroom]
name = "strange mushroom"
description = "A glowing mushroom that seems to pulse with light."
[items.berries]
name = "red berries"
description = "Small red berries that smell sweet."
Create a new story:
cargo run -- create my_adventure
Look at the generated story:
cat my_adventure/my_adventure.toml
Play the story:
cargo run -- play my_adventure/my_adventure.toml
In the game, try:
look - to see your surroundingsgo north - to move to another roomtake key - to pick up an iteminventory - to see what you're carrying# Build in debug mode
cargo build
# Run directly
cargo run -- create my_adventure
# Play included examples:
cargo run -- play haunted_house.toml
cargo run -- play ancient_temple.toml
src/
├── main.rs # CLI entry point
├── lib.rs # Library exports
├── engine/
│ ├── mod.rs # Game engine module
│ ├── game.rs # Main game state
│ ├── room.rs # Room management
│ ├── item.rs # Item system
│ └── parser.rs # Command parsing
├── story/
│ ├── mod.rs # Story loading
│ └── loader.rs # TOML parser
└── cli/
├── mod.rs # CLI commands
├── play.rs # Play command
└── create.rs # Story creation
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT