nostalgist

arianrhodsandlotMIT活跃维护

在浏览器里直接跑复古游戏机模拟器的 JavaScript 库,基于 RetroArch WASM,支持 NES、GBA、Atari 等多平台,省去本地安装。

A JavaScript library used for running emulators of retro consoles inside browsers.

v0.23.0发布于 2026-10-10 15:02 UTC987star49fork同步于 2026-11-09 11:48 UTC

怎么上手

由 README 提炼,执行前请确认
npm install nostalgist
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在浏览器里用 RetroArch 跑复古主机游戏的 JS 库,给个 ROM 和核心就能启动

在浏览器里直接跑复古游戏机模拟器的 JavaScript 库,基于 RetroArch WASM,支持 NES、GBA、Atari 等多平台,省去本地安装。

核心能力

  • 基于 RetroArch 的 Emscripten 构建在浏览器内启动模拟器
  • 调用 launch 传入 core 与 rom 即可免配置启动游戏
  • 支持 saveState 与 loadState 保存和恢复游戏状态
  • 启动前可自定义 RetroArch 及核心配置项
  • 可获取 Emscripten 模块与文件系统访问底层 API

容易踩的坑

默认的 ROM 与核心都从 jsDelivr 免费 CDN 加载,离线或内网环境需自行处理;库不提供任何 ROM 或 BIOS 文件,需自备合法内容;README 未说明浏览器兼容性要求

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.23.0
  1. v0.23.0最新正式版2026-10-10 · 2026-10-10 15:02 UTC

    Added

    • Add an onLog option for receiving the messages logged by RetroArch and libretro cores @RobLoach
    • Add support for cheats @RobLoach
  2. v0.22.02026-08-30 · 2026-08-30 15:57 UTC
    查看更新说明

    Added

    • Add basic multidisc fuctionality @alkorschun
  3. v0.21.12026-05-08 · 2026-05-08 10:18 UTC
    查看更新说明

    Fixed

    • Handle missing core info @bangnokia
  4. v0.21.02026-02-12 · 2026-02-12 11:17 UTC
    查看更新说明

    Added

    • Reload keyboard code cache when the Retroarch config file's modification time changes @beingretrogamer
  5. v0.20.22026-02-03 · 2026-02-03 16:10 UTC
    查看更新说明

    Fixed

    • Threaded core fixes @white-axe

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Nostalgist.js is a JavaScript library that allows you to run emulators of retro consoles, like NES and Sega Genesis, within web browsers.

    [!tip] Nostalgist.js is for developers. If you are a player rather than a developer planning to build something, you may want to try another open-source project RetroAssembly.

    A Quick Glance

    Website

    Checkout nostalgist.js.org for more online examples and documentation.

    Features

    • Launch a retro game with RetroArch emulator in a browser

      import { Nostalgist } from 'nostalgist'
      
      await Nostalgist.launch({
        core: 'fceumm',
        rom: 'flappybird.nes',
      })
      

      Related API: launch

    • Save the state of the game, then load it later

      import { Nostalgist } from 'nostalgist'
      
      const nostalgist = await Nostalgist.nes('flappybird.nes')
      const { state } = await nostalgist.saveState()
      await nostalgist.loadState(state)
      

      Related APIs: saveState, loadState

    • Customize any RetroArch config before launching

      import { Nostalgist } from 'nostalgist'
      
      const nostalgist = await Nostalgist.launch({
        core: 'fceumm',
        retroarchConfig: {
          rewind_enable: true,
        },
        retroarchCoreConfig: {
          fceumm_turbo_enable: 'Both',
        },
        rom: 'flappybird.nes',
      })
      

      Related API: launch#retroarchConfig

    • Access low level APIs of Emscripten

      import { Nostalgist } from 'nostalgist'
      
      const rom = 'https://example.com/zelda.sfc'
      const nostalgist = await Nostalgist.snes(rom)
      const FS = nostalgist.getEmscriptenFS()
      FS.readdir('/')
      

      Related APIs: getEmscriptenModule, getEmscriptenFS

    Motivation

    Nostalgist.js is built on top of RetroArch Emscripten builds. We love RetroArch to run in browsers because that's portable and convenient. Although there is already an official instance, RetroArch web player, and some third-party ones like webretro, it's still not that easy to launch RetroArch in a browser programmatically.

    The purpose of Nostalgist.js is to simplify the process of launching an emulator to play a game, via RetroArch, in browsers. Given a ROM and a core, the game should be launched without any additional configuration.

    APIs

    Please refer to nostalgist.js.org/apis.

    Related

    Showcases

    [!note] Feel free to add yours by sending a pull request.

    ProjectDescription
    RetroAssemblyThe personal retro game collection cabinet in your browser.
    vmeVirtual Machine / Emulator - multi emulator web app
    ultimate-homebrew-extensionsRuns an emulator to test ROMs inside of VS Code
    NextCloud NostalgistRun emulators of retro consoles directly in NextCloud via Nostalgist.js.
    NostalbitA retro web emulator with Next.js, Tailwind, TypeScript
    AstroEmuFamicom and Super Famicom on the web
    Koin.jsThe high-performance, preservation-focused netflix style emulation engine powered by Nostalgist.
    FoxolFoxol is a modern emulator platform with multiplayer, cloud saves, cheats, and deep customization across every device.

    Credits

    • These are the fundamental dependencies of Nostalgist.js.

    • We are using ROMs here for the purpose of demonstration.

      • retrobrews and the authors of the homebrew games.
    • By default, our ROMs and cores are all loaded from this free CDN service.

    Alternatives

    • EmulatorJS

      Another JavaScript library for emulation inside browsers.

      It's more powerful and more sophisticated. It includes many custom cores and has a friendly user interface. It can be used inside mobile browsers with touch support.

      It's not that friendly towards modern frontend development.

    Caveat

    [!caution]

    • Nostalgist.js DOES NOT provide any pirated content, like copyrighted ROM files or BIOS files.
    • And it DOES NOT encourage that.

    License

    MIT