Bun's Roadmap
Jarred-Sumner opened this issue Β· 154 comments
Bun's roadmap
2024 Q4
bun install
- #11863 (will unblock dependabot/dependabot-core#6528)
- #6608
- Fixes for frequently-reported issues for things like private git URLs and some edgecases with hoisting
-
bun update --interactive
(#4895) - #271
- #5846
- Update
bun init
to add"engines": { "bun": ...
by default. Ifbun
present then ignore node shebangs by default (#9346) - #692
Runtime
Node.js compatibility
- Implement
node:http2
server to unblock grpc2 - Implement more of V8 C++ APIs to unblock canvas, node-pty
- Rewrite node:http (#14384)
- Add much more comprehensive test coverage for napi
- Get at least 75% of Node's test suite running on every commit (as of last update: 37% currently). This number will go up in future
- Investigate removing our
undici
override - #13681
- #1723
Reliability
Bake (Bundler)
The goal for Bake is to make Bun the most productive tool for building static & full-stack JavaScript and TypeScript applications, leveraging runtime, bundler, and transpiler integration to make things simpler.
High level:
- Make a fast HMR development full-stack server - #14324
- Production builds (#14763)
- Static production builds
- Implement an integration with a popular framework (such as Next.js)
- Easy & powerful plugin API
bun test
- Reporter API or socket API
Organizational
- Hire a contractor to help us with CI
- Hire a technical writer to help with docs
- Hire an engineering-focused role for maintaining the TypeScript types & frontend for docs + help with integrations with third-party packages
- Hire more systems engineers
Previous quarters
2024 Q3
bun install
Essentially, feature complete.
-
bun outdated
- #487
-
bun publish
- Text-based lockfile format (which will help unblock dependabot/dependabot-core#6528)
-
bun update --interactive
(#4895) - Fixes for frequently-reported issues for things like private git URLs and some edgecases with hoisting
Runtime
Node.js compatibility
- TextEncoderStream & TextDecoderStream
- V8 C++ API (in-progress)
- Implement
node:cluster
- Implement
node:http2
server to unblock grpc2 - Rewrite
node:zlib
to address performance issues in some common packages - #13681
- Fix various bugs in
node:http
, avoid wrapping Bun.serve() and fetch() and use a more direct implementation - Add much more comprehensive test coverage for napi
- Get at least 25% of Node's test suite running on every commit (as of last update: 15% currently). This number will go up in future quarters.
Reliability
- Delete almost all code that manually reads JSValue. Replace with an IDL bindings generator for JavaScriptCore objects/classes that supports C++ & Zig output, and importantly: function arguments, return values, and exceptions. It should make the lifetime of these values brainless for us to reason about.
- Address TLS-related issues that have cropped up
- Continue to allocate significant time to fixing bugs and improve test coverage as they crop up
Bundler
- Fix many common bugs people run into related to source maps or incorrect output
- A new, higher-level iteration of Bun's bundler designed for server-driven JavaScript #14324
- CSS parser and bundler #14167
bun test
- Reporter API or socket API
Organizational
- Hire a contractor to help us with CI
- Hire a technical writer to help with docs
- Hire an engineering-focused role for maintaining the TypeScript types & frontend for docs + help with integrations with third-party packages
- Hire more systems engineers
this seems like a lot of work... wow
Can't wait for full npm-like config support. We are using our own npm registry, and the current build time is 40-60 minutes. If it will be at least 10 minutes this will be a game-changer!
I am waiting for the stable version of the bun. What change bun in the javascript world.
Also waiting for the stable version. So exciting! I bet it's going to take a lot of time though. The scope of this project is much larger than what Node attempts to solve.
can someone confirm that right now I can't use the package mysql2
? It throws me an error because it depends on TLS package and on NET package, and I think they were not implemented yet in Bun, but I am not sure.
still missing websocket server support
Can a tinitiny docker image be placed somewhere in there? π
Can't wait for Windows support... I'll be anxiously awaiting it until it's out. π
still missing websocket server support
Dito
Are you planning to support http2?
Are you planning to support http2?
HTTP/3 is on #159 so I would say HTTP/2 will likely be added before that
Are you planning to support http2?
HTTP/3 is on #159 so I would say HTTP/2 will likely be added before that
I would say that http3 on roadmap is more about quic protocol and there is no straight inheritance between http3 and http2, so maybe support of http2 needs to be marked explicitly.
Motivated to see a stable version ASAP
Promising !
Any roadmap on a progressive translation ?
When is the support for windows coming? Cant wait for it.
I would say that http3 on roadmap is more about quic protocol and there is no straight inheritance between http3 and http2, so maybe support of http2 needs to be marked explicitly.
Another vote for HTTP/2 as it's a prerequisite to gRPC support.
Any plans to create a desktop app like electron?
When is the support for windows coming? Cant wait for it.
#43 you can use WSL for now
On the topic of CSS parsing, transpilation, minification, etc., what's your stance on dependencies? Do you want to reimplement everything yourself, or would you consider using an embeddable library? If so, I'd love to collaborate with you on embedding Parcel CSS in Bun. It's implemented in Rust, but if we added a C API, I think Bun could call into it pretty easily. It may also work via Bun's napi support, but that would probably be slower. It's about 4x faster than esbuild on benchmarks, minifying over 2 million lines of code per second on a single thread. You can find more info in the announcement blog post from February, though it's gotten even faster since then. Would be cool to work together, and I'm happy to help support how I can.
One thought re: minification, please include a way to exclude class/parameter (on both function and constructor args, and incl. subkeys)/function names from minification as it makes certain dependency injection patterns impossible.
Traditionally, many of the existing DI libraries would use Function.toString() and then use some regex to pull out the fn name & args, but given the reason that is needed and how hacky it is, this may be an opportunity for bun to create a better solution ahead of time, for example by exposing the pre-minified function/class names + argument names programmatically such that they are available at runtime. Note that they much be able to be retrieved before the function is called or class is instantiated.
How about full support for NestJS? Looking forward to it.
[ ] read resolutions
from package.json
Bun should move toward full support for nestjs.
Are there any plans for bun language server? Deno provides one: https://deno.land/manual@v1.29.1/advanced/language_server/overview, so I thought bun might do as well
Bun === GOAT
Setup a donations button!!
As an Electron
or Tauri
alternative.
Maybe should consider to build single-file executable files. .exe
or .msi
for windows and .dmg
and .pkg
for macos.
Would love to eventually see support for Qwik. Down the line would be willing to help with the effort too.
Would love to eventually see support for Qwik. Down the line would be willing to help with the effort too.
Yes!!!!!!!!!!!!!!!!! Qwik + Bun === GOAT
Some cool dependency injection would be nice, such as https://www.npmjs.com/package/node-dependency-injection without decorators and making possible configuring yml files for each enviroment, for example. Keep that absolute good work! Love it <3
Would a linter/formatter be considered in the future? An alternative to eslint that'd use Bun's parser, would be faster and would have a better plugin/config format?
when can have a tool with bundle analyzerοΌIt's like webpack-bundle-analyzerγ
https://github.com/webpack-contrib/webpack-bundle-analyzer
of course , Providing 'stats.json' files is also possible
For me the main blockers are:
- Remix with
renderToPipeableStream
- Turborepo
- NestJS
what about native path alias support?
- edit : you can use path alias without any npm module. just add
path
andbaseUrl
in tsconfig.json.
For me the main blockers are:
- Remix with
renderToPipeableStream
React docs statement about renderToPipeableStream
:
This API is specific to Node.js. Environments with Web Streams, like Deno and modern edge runtimes, should use renderToReadableStream instead.
Here is example of remix + bun repo https://github.com/jacob-ebey/bun-remix
For me the main blockers are:
- Remix with
renderToPipeableStream
React docs statement about
renderToPipeableStream
:This API is specific to Node.js. Environments with Web Streams, like Deno and modern edge runtimes, should use renderToReadableStream instead.
Here is example of remix + bun repo https://github.com/jacob-ebey/bun-remix
Yeah I found that. Also I get turborepo to work by simulating yarn usage:
- First setup
workspaces
field inpackage.json
(https://bun.sh/docs/install/workspaces) - Then install dependencies with bun(the
--yarn
flag will generate ayarn.lock
file):
bun install --yarn
- Then setup the
packageManager
field inpackage.json
toyarn
(you should haveyarn
installed in the $PATH):
"packageManager": "yarn@1.22.19"
- Now on every turbo command you should add
--skip-infer
, e.g.:
bun turbo build --skip-infer
Turbo will only use yarn
to generate the package graph, but the packages resolution will be handled by bun. This is a workaround until this issue get fixed vercel/turborepo#4762
Please integrate parcel with bun, as some of the problems on the web world are solved very well by them
what about web cache api?
Is there a roadmap of for v1.0 release? Would like to know what's going to be completed for v1.0. Thanks!
amazing!!!
"Supporting both https: and http: imports" - Once this feature is up and running, it has the potential to give Deno a tough run
@Jarred-Sumner, hi, it would be great to update roadmap
When can we get HMR for Frontend dev server?
@Jarred-Sumner Are there any plans for adding custom ts ast transformers?
Hi,
Kindly revise this roadmap to reflect the release of Bun 1.0, or alternatively, create a new roadmap for Bun 2.0.
Hi, is there any development on support for Windows? Been very excited to switch from NodeJs to Bun π
Hi, is there any development on support for Windows? Been very excited to switch from NodeJs to Bun π
Bun 1.0 did launch with windows support.
@KingCh1ll lots of development - in here:
Any plan to make remote cache available for building with CI in the future?
Amazing work guys, truly beautiful. Tried it out on my existing NextJS app works no issues. Looking forward for better support to make use of all the buntastic benefits
Support running Bun from StackBlitz
And how does it look now?
UDP (including multicast) support should be added as a key requirement for the Edge runtime (for IoT solutions)
Suggestion to add to the Web Bundler
actual Web Worker
support.
Some more interesting discussion here: #2906 (comment)
Note especially the trampoline fallback. I had to build a special webpack plugin to support proper code-splitting.
I'm really wondering if there are any plans for a hosted runtime service, a little bit like deno deploy.
I'm guessing it's not coming too soon otherwise there would have been some talks about it.
(if there ever is, please please please consider enabling log forwarding. Having a solution where you can just access logs real time is just no rational for a production application. you don't need to persist logs, just enable us to forward them somewhere where we can persist them).
@happysalada , Jarred gave some exciting hints here : https://youtu.be/RYla4B3DwxY?feature=shared&t=2413
... what I'm really excited about after 1.0 is hosting and basically we're gonna make it really easy to deploy and really fast and cheap to deploy JavaScript to production. It's gonna be a pretty different architecture than what most existing things that are out there do sort of the same philosophy of we can build a lot of things from scratch on bun we're going to bring that also to hosting and I think we'll have interesting things to talk about there in in six months
i would say css/scss support is a must before calling it ready for battle.
Maybe add a timeline / roadmap for the cluster
feature?
suport for postgres or mongodb
Would be nice to have optimized, Bun-native String and Collections APIs.
a better (maybe native) amqp lib ?
Support Quasar?
looking forward to IIFE in Bun.build
It seems that native support for SQLite, PostgreSQL and MySQL is planned or already implemented.
This is perfect for every developer to choose the right relational database for their project.
But what about fast key-value store for a cache? Something like Redis should be perfect.
It seems that native support for SQLite, PostgreSQL and MySQL is planned or already implemented. This is perfect for every developer to choose the right relational database for their project.
But what about fast key-value store for a cache? Something like Redis should be perfect.
Also Key-Value like Couchbase
a better (maybe native) amqp lib ?
We want to see this too, tried the amqp npm package but it had issues in high throughput that caused the process to hang (last checked about 4 months ago)
Why can't just bun compile the JS or typescript into an executable like Golang / Rust does ?
Without the BUN runtime ofcourse, just become a compiler, This would be insanely beneficial, Shipping a single executable that handles the server and its fast, no runtime, the executable is small. The stuff of dreams
I know that JS is an interpreted language but there's mojo, a compiled language and a superset of python, Java with GraalVM now being compiled, One day or the other JS needs to be compiled
Maybe you should check Hermes Engine.
@norman784 I just looked Static Hermes, I'll give it a try. Still Bun should try do that...
Dear bun core dev team, the current documentation page is quite unattractive, not very user-friendly, and hard to learn from, especially when compared to Deno's official documentation. We would greatly appreciate it if you could improve the UI/UX of the bun homepage
Dear bun core dev team, the current documentation page is quite unattractive, not very user-friendly, and hard to learn from, especially when compared to Deno's official documentation. We would greatly appreciate it if you could improve the UI/UX of the bun homepage
It is likely that it can be improved, but I have to emphasize that the Bun community is very good, any questions you can ask on Discord and they are always willing to help and are very involved. Besides I love that they have put the button "Ask AI" on docs.
will you tend to support Angular Framework like you did with React?
will you tend to support Angular Framework like you did with React?
@moraby256 Angular uses TS, not JSX/TSX like React, and TypeScript is already supported by Bun
SolidJS uses JSX, Bun could support that...
SolidJS uses JSX, Bun could support that...
Is already supported
this has not been updated post Bun 1.0, we will update it soon.
Considering I use this page as a way to keep up with Bun progress, would be nice if this issue got more attention from the main team.
Any plans around http2
server implementation? There are no updates about that in the main thread so I figured I'd check the roadmap but it does not mention anything.
cluster, http2 π€
Import maps https://github.com/WICG/import-maps
Hi! is there any movement on the css loading front?
I've just tried to run storybook
through bun, but it looks like node:zlib
equivalent isn't available:
$ bunx --bun storybook dev
error: zlib.createBrotliDecompress is not implemented
at node:zlib:2269:65
at node_modules/@storybook/core-server/dist/presets/common-preset.js:12:32306
at node:http:887:29
Will this be part of this roadmap at some point?
When can we have CSS/SCSS parser feature?
When can we have CSS/SCSS parser feature?
Looking forward to the CSS parser too
I would say that http3 on roadmap is more about quic protocol and there is no straight inheritance between http3 and http2, so maybe support of http2 needs to be marked explicitly.
Another vote for HTTP/2 as it's a prerequisite to gRPC support.
Bump... really need this, game changer
based on @Jarred-Sumner's answer here, where does Telemetry fit into the current roadmap?
Please Fix this Bug ASAP
#5856
Please Fix this Bug ASAP #5856
Jarred has already said the bug will be fixed a little bit after v1.1 is finished. The development team is currently working on the Windows release.
Would love to help support work on #2704 as part of the Developer Experience roadmap
Thanks, #Bun for being a fast and easy-to-use JavaScript runtime! I appreciate your speed and compatibility with existing Node.js projects.
+1 for TextDecoderStream
AuthJS relies on this and will be out soon (successor to NextAuth)
β¨― error: Attempt to export a nullable value for "TextDecoderStream"
at defineProperties (file:///workspaces/dev-1/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js:1:1)
at addPrimitives (file:///workspaces/dev-1/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js:13902:25)
at extend (file:///workspaces/dev-1/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js:13854:113)
at new VM (file:///workspaces/dev-1/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js:13946:88)
at new EdgeVM (file:///workspaces/dev-1/dashboard/node_modules/next/dist/compiled/edge-runtime/index.js:13854:16)
at file:///workspaces/dev-1/dashboard/node_modules/next/dist/server/web/sandbox/context.js:102:163
Is NextJS fully supported?
I test on my project it work well
@001123 Do you use "Pages Router" or "App Router" ?
I'm just test on "Pages router"
Any plans to support WebRTC data channels in the API? Very happy with the performance of the WebSockets API and would love to see more of these modern protocols (+1 for HTTP/3) getting some attention. Currently, there are Node.js bindings for libdatachannel but at the time of writing, no runtime has implemented data channels natively.
When can we get CommonJS output format support for the build?
https://bun.sh/docs/bundler#format cjs
"Support blob: imports & URLs (URL.createObjectURL, URL.revokeObjectURL)" is done right? it should be checked
"Support blob: imports & URLs (URL.createObjectURL, URL.revokeObjectURL)" is done right? it should be checked
What are you observing is an issue with the implementation?
It looks like URL. is defined on a global
url`, which is odd to me to have a common variable name defined globally. Otherwise appears to work.