ND

nubo-db/dynoxide

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

103 stars 9 forks 质量 68 趋势 29Apache-2.0

一个用Rust构建的DynamoDB模拟器,支持SQLite。作为单一静态二进制文件,起步时间为毫秒,并通过公开合规套件与真实AWS进行验证。

概览

一个用 Rust 编写的 DynamoDB 模拟器,支持于 SQLite。作为 HTTP 服务器或 MCP 服务器运行,用于编码代理,嵌入 Rust 和 iOS 应用中作为库,并编译为浏览器的 WebAssembly。 上方 crates.io 徽章显示了版本,仅涵盖了Rust库。你安装的所有东西(而非依赖)都带有独立版本:二进制文件、npm包、容器镜像、浏览器引擎和Action。这就是数字dynoxide——版本打印,也是在错误报告中引用的版本。为什么有两个。 我做 Dynoxide 是因为 DynamoDB Local 运行缓慢、负载大且无法嵌入。它需要一个 JVM,而典型的基于 Docker 的设置会在你做任何有用操作之前,先增加 ~3 秒的冷启动,~209 MB 的空闲内存,以及 ~225MB 的 Docker 镜像(盘上约 473 MB)。如果你在运行集成测试,那就是 Docker 启动、JVM 预热、流水线等待。 二氧化物是本地二进制。它以毫秒为单位开始,空闲时间为~7。

概述(AI 翻译)

一个用 Rust 编写的 DynamoDB 模拟器,支持于 SQLite。作为 HTTP 服务器或 MCP 服务器运行,用于编码代理,嵌入 Rust 和 iOS 应用中作为库,并编译为浏览器的 WebAssembly。

上方 crates.io 徽章显示的是crate版本,仅涵盖Rust库。你安装的所有东西(而非依赖)都带有一个独立的product版本:二进制文件、npm包、容器镜像、浏览器引擎和Action。这就是打印数量dynoxide --version,也是在错误报告中引用的。为什么有两个。

为什么是Dynoxide?

我做Dynoxide是因为DynamoDB Local慢、笨重,而且不能嵌入。它需要一个JVM,而典型的基于Docker的设置会在你做任何有用操作之前,先增加~3秒的冷启动,~209MB的空闲内存,以及~225MB的Docker镜像(盘上~473MB)。如果你在运行集成测试,那就是Docker启动、JVM预热,以及流水线等待。

Dynoxide 是原生二进制。它起步时间为毫秒,空闲时 ~7.2 MB,并以 ~3MB 的下载形式发布。用任何 DynamoDB SDK 对准它,你的测试就能正常工作。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Dynoxide

A DynamoDB emulator in Rust, backed by SQLite. Runs as an HTTP server or an MCP server for coding agents, embeds into Rust and iOS applications as a library, and compiles to WebAssembly for the browser.

The crates.io badge above shows the crate version, which covers the Rust library alone. Everything you install rather than depend on carries a separate product version: the binary, the npm packages, the container images, the browser engine and the Action. That is the number dynoxide --version prints and the one to quote in a bug report. Why there are two.

Why Dynoxide?

I built Dynoxide because DynamoDB Local is slow, heavy, and can’t embed. It needs a JVM, and the typical Docker-based setups adds ~3 seconds of cold-start, ~209 MB of memory at idle, and a ~225MB Docker image (~473 MB on disk) before you’ve done anything useful. If you’re running integration tests, that’s Docker starting, the JVM warming up, and your pipeline waiting.

Dynoxide is a native binary. It starts in milliseconds, idles at ~7.2 MB, and ships as a ~3 MB download. Point any DynamoDB SDK at it and your tests just work.

For Rust projects, there’s also an embedded mode - direct API calls via Database::memory() with no HTTP layer at all. Each test gets an isolated in-memory database with zero startup cost. And because it compiles to a native library with no runtime dependencies, it runs on platforms where DynamoDB Local can’t, including iOS.

Performance

Local Development (Apple Silicon)

Metric Dynoxide (embedded) Dynoxide (HTTP) DynamoDB Local
Cold startup ~0.2ms ~15ms ~2,287ms
GetItem (p50) 9µs 0.1ms 0.8ms
在 GitHub 查看完整 README

安装

npx dynoxide --port 8000
新手?先看 mcpskill.org 教程 →