Bun JS toolkit adds MySQL driver, secrets API, YAML, and more
(2025/08/27)
- Reference: 1756317254
- News link: https://www.theregister.co.uk/2025/08/27/bun_js_toolkit_adds_mysql/
- Source link:
The Bun team has released version 1.2.21 of its JavaScript bundler and runtime, written in Zig, adding features including built-in drivers for MySQL and SQLite, a YAML parser, and a secrets manager for tools and local development.
The new database drivers are part of the bun.SQL API, introduced in January, which initially supported only PostgreSQL. Now Bun also supports MySQL and MariaDB. In addition, a SQLite client, which has long been part of Bun as bun:sqlite, has been added to Bun.SQL, described in the docs as "a unified API for multiple database systems."
[1]According to Bun creator Jarred Sumner, Bun.SQL is nine times faster than using the mysql2 package with Node.js, and over four times faster than using the MariaDB client with Node, based on the time taken to run 100,000 simple queries. The MySQL driver, like Bun itself, is written in [2]Zig .
The Bun team claims its built-in MySQL client is up to 9 times faster than mysql2 on Node.js
Bun.secrets, also new in this release, is a native secrets manager for CLI (command-line interface) tools and local development. On macOS, it uses the Keychain, on Linux it uses libsecret, and on Windows, the Credential Manager. The advantage is that it avoids storing data such as passwords and tokens in plain text files.
The latest release also adds a YAML parser to the Bun API, which works in the same way as existing parsers for JSON and TOML.
[3]
Other updates in this release include a security scanner API (dependent on first installing a security scanner package), a more fine-grained audit command for reporting vulnerabilities, an API for building standalone executables (previously only available on the command line), and a codesigned bun.exe binary for Windows, removing a security warning.
[4]
[5]
Bun 1.0 was released in September 2023, following preview releases beginning in [6]July 2022 . It is notable not only for its use of Zig, but also for using Apple's [7]JavaScriptCore as the runtime engine, whereas rivals Node.js and Deno use Google's V8 engine.
[8]Oracle urged again to give up JavaScript trademark
[9]Python dethrones JavaScript as the most-used language on GitHub
[10]AI coding tools make developers slower but they think they're faster, study finds
[11]Caught a vibe that this coding trend might cause problems
While the name Bun implies bundler functionality, the scope of the tool goes beyond this and the [12]docs now describe it as an "all-in-one toolkit for JavaScript and TypeScript apps." The team aims for full Node.js compatibility though this is not yet complete. Bun also includes a test runner, a server with hot reloading (reload code without breaking connections), and built-in APIs for databases, S3-compatible object storage, and a Redis client.
The additional features in Bun leave it vulnerable to accusations of feature-creep, with some developers arguing that database clients, for example, do not belong in the core runtime. "Next: bunos operating system" [13]quipped one on X, commenting on the latest update.
The counter-argument is these features are convenient for developers and reduce the number of dependencies in an application.
[14]
"There's practically nothing in Bun that doesn't already exist in the JS ecosystem. Almost all of it, one could argue, is a lot of duplicated effort. Except that it's not because Bun is awesome and brings it into one place with amazing performance and good ergonomics," [15]said one comment to Bun's roadmap on GitHub.
The date for the next major release, Bun 1.3, will be announced soon, Sumner said on X.®
Get our [16]Tech Resources
[1] https://bun.com/blog/bun-v1.2.21
[2] https://ziglang.org
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[6] https://devclass.com/2022/07/06/zig-based-bun-appears-in-beta-an-incredibly-fast-all-in-one-javascript-runtime/
[7] https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore
[8] https://www.theregister.com/2024/09/17/oracle_urged_to_surrender_javascript_trademark/
[9] https://www.theregister.com/2024/11/05/python_dethrones_javascript_github/
[10] https://www.theregister.com/2025/07/11/ai_code_tools_slow_down/
[11] https://www.theregister.com/2025/07/25/opinion_column_vibe_coding/
[12] https://bun.com/docs
[13] https://x.com/Thomasmarkelly/status/1959983087246303370
[14] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[15] https://github.com/oven-sh/bun/issues/159#issuecomment-2963491729
[16] https://whitepapers.theregister.com/
The new database drivers are part of the bun.SQL API, introduced in January, which initially supported only PostgreSQL. Now Bun also supports MySQL and MariaDB. In addition, a SQLite client, which has long been part of Bun as bun:sqlite, has been added to Bun.SQL, described in the docs as "a unified API for multiple database systems."
[1]According to Bun creator Jarred Sumner, Bun.SQL is nine times faster than using the mysql2 package with Node.js, and over four times faster than using the MariaDB client with Node, based on the time taken to run 100,000 simple queries. The MySQL driver, like Bun itself, is written in [2]Zig .
The Bun team claims its built-in MySQL client is up to 9 times faster than mysql2 on Node.js
Bun.secrets, also new in this release, is a native secrets manager for CLI (command-line interface) tools and local development. On macOS, it uses the Keychain, on Linux it uses libsecret, and on Windows, the Credential Manager. The advantage is that it avoids storing data such as passwords and tokens in plain text files.
The latest release also adds a YAML parser to the Bun API, which works in the same way as existing parsers for JSON and TOML.
[3]
Other updates in this release include a security scanner API (dependent on first installing a security scanner package), a more fine-grained audit command for reporting vulnerabilities, an API for building standalone executables (previously only available on the command line), and a codesigned bun.exe binary for Windows, removing a security warning.
[4]
[5]
Bun 1.0 was released in September 2023, following preview releases beginning in [6]July 2022 . It is notable not only for its use of Zig, but also for using Apple's [7]JavaScriptCore as the runtime engine, whereas rivals Node.js and Deno use Google's V8 engine.
[8]Oracle urged again to give up JavaScript trademark
[9]Python dethrones JavaScript as the most-used language on GitHub
[10]AI coding tools make developers slower but they think they're faster, study finds
[11]Caught a vibe that this coding trend might cause problems
While the name Bun implies bundler functionality, the scope of the tool goes beyond this and the [12]docs now describe it as an "all-in-one toolkit for JavaScript and TypeScript apps." The team aims for full Node.js compatibility though this is not yet complete. Bun also includes a test runner, a server with hot reloading (reload code without breaking connections), and built-in APIs for databases, S3-compatible object storage, and a Redis client.
The additional features in Bun leave it vulnerable to accusations of feature-creep, with some developers arguing that database clients, for example, do not belong in the core runtime. "Next: bunos operating system" [13]quipped one on X, commenting on the latest update.
The counter-argument is these features are convenient for developers and reduce the number of dependencies in an application.
[14]
"There's practically nothing in Bun that doesn't already exist in the JS ecosystem. Almost all of it, one could argue, is a lot of duplicated effort. Except that it's not because Bun is awesome and brings it into one place with amazing performance and good ergonomics," [15]said one comment to Bun's roadmap on GitHub.
The date for the next major release, Bun 1.3, will be announced soon, Sumner said on X.®
Get our [16]Tech Resources
[1] https://bun.com/blog/bun-v1.2.21
[2] https://ziglang.org
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[6] https://devclass.com/2022/07/06/zig-based-bun-appears-in-beta-an-incredibly-fast-all-in-one-javascript-runtime/
[7] https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore
[8] https://www.theregister.com/2024/09/17/oracle_urged_to_surrender_javascript_trademark/
[9] https://www.theregister.com/2024/11/05/python_dethrones_javascript_github/
[10] https://www.theregister.com/2025/07/11/ai_code_tools_slow_down/
[11] https://www.theregister.com/2025/07/25/opinion_column_vibe_coding/
[12] https://bun.com/docs
[13] https://x.com/Thomasmarkelly/status/1959983087246303370
[14] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/devops&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aK9_9tVLpITvPuNhV1AbLQAAAEU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[15] https://github.com/oven-sh/bun/issues/159#issuecomment-2963491729
[16] https://whitepapers.theregister.com/