fluffos/docs/index.mdx
Yucong Sun 89060c5a6b
docs: fully-expandable generated sidebar + Chinese docs via Docusaurus i18n (#1246)
* docs: fully-expandable generated sidebar, replacing index.md link pages

Rework docs navigation so the sidebar expands to every page of every
reference tree, instead of terminating at generated index.md link lists:

- New docs/gen_sidebar.py (replaces gen_index.py + update_index.sh):
  walks efun/, apply/, stdlib/, concepts/, driver/, cli/ and zh-CN/ and
  emits sidebars.generated.json — a full Docusaurus category tree per
  directory. Category landing pages are now `generated-index` card pages
  (title/description/slug), so all generated index.md files are deleted.
  --check mode verifies freshness; new .github/workflows/docs-sidebar.yml
  runs it in CI.
- New docs/sidebar_meta.json holds curated presentation: category labels,
  one-line descriptions (shown on the landing cards), explicit ordering
  (driver/cli/concepts read top-down from user-facing to internals) and
  per-page label overrides.
- sidebars.ts becomes a hand-authored skeleton (Getting Started, lpc/,
  Historical) that splices in the generated trees.

Content reorganization (from a docs-wide review):
- Move misplaced efun pages out of efun/general: terminal/protocol efuns
  (act_mxp, send_zmp, request_term_*) to interactive/, debugging efuns
  (check_memory, dump_*, clear_debug_level, destructed_objects) to
  internals/, shallow_inherit_list to system/.
- Delete stub duplicates superseded by complete pages elsewhere:
  general/parse_{add_synonym,dump,my_rules,remove}, contrib/{shuffle,
  element_of}.

Modernize key pages with MDX:
- index.mdx: landing page with a card grid linking each doc section.
- build.mdx: per-platform <Tabs> (Ubuntu/macOS/Windows/Alpine+Docker),
  admonitions, VitePress [[toc]] leftover removed, stale per-platform CI
  workflow links updated to the unified ci.yml.
- ffi-plan.md: GitHub-style [!CAUTION] alert converted to an admonition.

`npm run build` passes clean (onBrokenLinks: throw, no warnings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174GM2azvAHBmvyESwxm5om

* docs: serve the Chinese corpus through Docusaurus i18n

Move the zh-CN/ directory out of the default docs tree and into a proper
Docusaurus locale (i18n/zh-CN/docusaurus-plugin-content-docs/current/):

- The flat zh-CN/efun/ directory (333 pages) is re-homed to mirror the
  categorized English layout (name-matched 1:1; `hash` maps to strings/
  per its own frontmatter). apply/ pages map 1:1; the stray English-text
  zh-CN/apply/master/view_errors.md documents a MudOS-era apply that no
  longer exists in the driver and is dropped; stdlib/db/database_zh.md
  becomes the i18n translation of stdlib/db/database.md; the Chinese
  build guide becomes the translation of build.mdx.
- Untranslated pages automatically fall back to English content under
  /zh-CN/, so the whole site is navigable in either locale from the new
  navbar locale dropdown.
- Both locales share one sidebar. Generated sidebar items now carry
  stable `key` fields (the directory/doc path) so translation keys are
  unique (both efun/ and stdlib/ have an "Arrays" category, crypto and
  strings both document `hash`). Category labels, generated-index
  titles/descriptions, navbar and footer are translated in
  i18n/zh-CN/...; theme UI strings come from Docusaurus' bundled
  zh-Hans translations. Translated landing page at /zh-CN/.
- The "中文文档" sidebar section, the zh-CN tree in gen_sidebar.py /
  sidebar_meta.json, and its slice of sidebars.generated.json are gone.
- Relative .md-file links on pages that render in both locales break
  the localized build (the file->permalink map points at the localized
  copy), so concepts/, the two socket_*_option pages and the config.md
  generator now emit extension-less route links instead.
- zh interactive.md/objects.md get explicit slugs like their English
  counterparts (a doc named after its parent directory is otherwise a
  Docusaurus category-index doc, colliding with the generated-index
  route).

`npm run build` builds both locales clean (onBrokenLinks: throw).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174GM2azvAHBmvyESwxm5om

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-11 17:20:25 -04:00

138 lines
6.1 KiB
Text

---
title: FluffOS
slug: /
---
# FluffOS
FluffOS is a high-performance game engine (an LPMUD driver), commonly used for building MUDs — see
[LPMud](https://en.wikipedia.org/wiki/LPMud). Started as a collection of patches to the last release
of MudOS, FluffOS has gone through major rewrites and bugfixes to support new features while
maintaining backward compatibility with existing mudlibs.
The codebase has three parts:
- **LPC interpreter** — parses and executes LPC programs.
- **Network server** — manages client connections and exposes them to LPC. Supports TELNET, TLS and WebSocket.
- **Glue interface**
- **Efuns** — built-in C/C++ functions callable from LPC programs.
- **Applies** — callback functions the driver invokes on LPC objects for game events.
:::tip[Current release]
The current release is branch `master` — CMake build system, supported on Ubuntu, macOS,
Windows (MSYS2/MinGW64), and WebAssembly.
See [all releases on GitHub](https://github.com/fluffos/fluffos/releases).
:::
## Explore the documentation
<div className="row">
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>🚀 Getting Started</h3></div>
<div className="card__body">
Build the driver from source on Linux, macOS, Windows — or for the browser with WebAssembly.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/build">Build Guide</a>
</div>
</div>
</div>
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>📖 LPC Language</h3></div>
<div className="card__body">
The LPC language as implemented by FluffOS: types, constructs, the preprocessor, and compiler diagnostics.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/lpc/">Language Reference</a>
</div>
</div>
</div>
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>⚙️ Efuns</h3></div>
<div className="card__body">
The complete reference of built-in functions the driver exposes to LPC code, grouped by topic.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/efun/">Efun Reference</a>
</div>
</div>
</div>
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>🔔 Applies</h3></div>
<div className="card__body">
Callbacks the driver invokes on your objects: master security hooks, object lifecycle, and player connections.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/apply/">Apply Reference</a>
</div>
</div>
</div>
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>💡 Concepts</h3></div>
<div className="card__body">
How LPC, objects, and the driver fit together — simul_efuns, hot reload, networking, and more.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/concepts/">Concept Guides</a>
</div>
</div>
</div>
<div className="col col--4 margin-bottom--lg">
<div className="card" style={{height: '100%'}}>
<div className="card__header"><h3>🔧 Driver Internals</h3></div>
<div className="card__body">
Runtime configuration, the VM stack machine, memory allocation, and how to add your own efuns.
</div>
<div className="card__footer">
<a className="button button--secondary button--block" href="/driver/">Driver Docs</a>
</div>
</div>
</div>
</div>
## Features
- Builds on Ubuntu, macOS, and Windows natively with CMake — plus a WebAssembly target that runs a full mudlib in the browser.
- UTF-8 native, with transparent input/output encoding support. (Emojis!)
- WebSocket support!
- TLS support!
- SHA512 crypt by default.
### Features previously released
- Mostly backward-compatible with MudOS. (Upgrading should be easy!)
- Lots of bug fixes, including a full CHECK_MEMORY-enabled testsuite pass.
- Compiles on modern Linux distros, 32-bit & 64-bit, CYGWIN support.
- 64-bit LPC runtime: LPC `int` is always a 64-bit int, LPC `float` is a C double.
- MXP, GMCP, ZLIB.
- IPv6 support (optional).
- ICONV support: code in UTF-8, dynamic translation on output (optional).
- POSIX timer for better time precision (optional).
- Stricter type checking (optional).
- libevent integration, epoll backend.
## License & Copyright
> Copyright 2019-2023 Yucong Sun
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
> documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
> rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
> persons to whom the Software is furnished to do so, subject to the following conditions:
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
> Software.
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
> WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
### Historical
For the pre-2019 license and copyright, see
[Copyright](https://github.com/fluffos/fluffos/blob/master/Copyright); for older release notes, see
[ChangeLog.fluffos-3.x](https://github.com/fluffos/fluffos/blob/next-3.0/ChangeLog.fluffos-3.x).