Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add support for Bun #198

Open
mdizo opened this issue Sep 10, 2023 · 8 comments
Open

[Feature]: Add support for Bun #198

mdizo opened this issue Sep 10, 2023 · 8 comments

Comments

@mdizo
Copy link

mdizo commented Sep 10, 2023

Describe the feature you'd like.

Now that Bun has reached stable development, this would be nice to have support for.

@smcenlly
Copy link
Member

Thanks for the feature request.

To fully support Bun in our tools, we require certain enhancements in Bun itself. We have been actively exploring collaboration opportunities with the Bun team to make the changes we need. While we aim to bring this support as soon as possible, we appreciate your understanding that timelines might vary based on various factors, some of which are outside of our control.

We will post here when we have updates to share.

@tilenpirih
Copy link

agree, can't wait for it

@ArtemGovorov
Copy link
Member

Support for Bun Vite has been shipped in v0.0.222+.
bunVite

@paperdave
Copy link

when testing on my personal website (astro) it doesn't seem to work. lots of errors.

image

i tried to debug this myself but it's hard to navigate the obfuscated bundle, seems to be something within our node:streams but cannot tell.

We have been actively exploring collaboration opportunities with the Bun team to make the changes we need.

Sorry, I haven't been aware of this. What's blocking Console Ninja on Bun?

@ArtemGovorov
Copy link
Member

ArtemGovorov commented Sep 15, 2023

@paperdave Hey 👋, any chance your personal website is published on Github or we can access its source to debug? We have tried simple Astro project generated as described at https://bun.sh/guides/ecosystem/astro, and it worked, but don't have any more complicated samples of Astro at the moment.

Sorry, I haven't been aware of this. What's blocking Console Ninja on Bun?

We have been in contact via email with Jarred few weeks ago. To fully support Bun we may need something like process.binding('fs') in node. Basically need a way to intercept file reads from any fs.* calls and Bun module loading system as well. We have been exploring using plugins/loaders for that, but it gets a bit complicated when other user loaders are set. We also ideally need to be able to set the fs hook in a way that user doesn't have to add any manual bunfig.toml entries.

@ArtemGovorov
Copy link
Member

@paperdave We have been able to identify the issue from the stack. It's our newly added (for Bun only) rotated stream library was acting up (we couldn't use our time proven rotated stream dependency and had replaced it for Bun because Bun doesn't support FileHandle returned from fs/promises .open yet). Please try updating the extension to v0.0.223, this error should be gone now.

@sebastianbuechler
Copy link

Is it possible that Console Ninja works with bun, but is super slow? When I had it turned on it took an empty template project more than 60 seconds to run, but turning Console Ninja off it started within a couple seconds.

@smcenlly
Copy link
Member

@sebastianbuechler - we're not familiar with any performance issues with using Console Ninja with bun, but we would like to investigate your issue. Can you please describe how you are creating your empty project template (the issue may be specific to your framework / tech stack)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants