TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Bun 0.6

421 点作者 tommasoamici大约 2 年前

19 条评论

hu3大约 2 年前
&gt; Standalone executables. You can now create standalone executables with bun build.<p>&gt; bun build --compile .&#x2F;foo.ts<p>&gt; This lets you distribute your app as a single executable file, without requiring users to install Bun.<p>&gt; .&#x2F;foo<p>This is big! Part of Go&#x27;s popularity is due to how easy it is to produce self-contained executables.<p>And it seems to support amd64 and arm according too: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;jarredsumner&#x2F;status&#x2F;1657964313888575489" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;jarredsumner&#x2F;status&#x2F;1657964313888575489</a>
评论 #35967599 未加载
评论 #35966185 未加载
评论 #35965864 未加载
评论 #35965901 未加载
评论 #35972267 未加载
评论 #35967683 未加载
评论 #35966038 未加载
评论 #35967086 未加载
评论 #35970636 未加载
Jarred大约 2 年前
I work on Bun. Happy to answer any questions<p>also: there is a bug in `bun build --compile` I am currently working on fixing. Expect a v0.6.1 in a bit
评论 #35966373 未加载
评论 #35966259 未加载
评论 #35965765 未加载
评论 #35966192 未加载
评论 #35965709 未加载
评论 #35967110 未加载
评论 #35966722 未加载
评论 #35966042 未加载
评论 #35968620 未加载
评论 #35965829 未加载
评论 #35966929 未加载
评论 #35966602 未加载
评论 #35967818 未加载
评论 #35970869 未加载
tankenmate大约 2 年前
I am truly perplexed as someone outside of the Javascript ecosystem; why are there so many incompatible bundlers? If you look at most compiled languages they have a set ABI &#x2F; executable image format, and you just use a link editor (either compile time, run time, or both).<p>Is it just because most Javascript developers have never learnt from any of the lessons that came from decades of compiled languages? (compilers, compiler tools, operating system and kernel development, etc).<p>Is there some benefit that Javascript bundlers have that I&#x27;m unaware of?<p>Truly curious.
评论 #35966679 未加载
评论 #35966821 未加载
评论 #35966600 未加载
评论 #35966425 未加载
doodlesdev大约 2 年前
Tangential, but, this has to be one of the fastest websites I&#x27;ve used recently. How is it possible they get such fast loading of static content? It&#x27;s basically instantaneous, specially with JavaScript disabled.<p>edit: Oh well, after navigating to some pages on the blog I see that everything was already on browser cache, so that&#x27;s why it was so fast. Reminds me I need to overwrite Netlify&#x27;s cache-control on my website, even though it&#x27;s already very fast to load (Netlify sets max-age=0, must-revalidate by default).
评论 #35966225 未加载
评论 #35965835 未加载
评论 #35967903 未加载
gavmor大约 2 年前
`bun` is currently my favorite &quot;just works out of the box&quot; utility for running Typescript programs.<p>I&#x27;ve tried a couple and struggled with configuration and, on top of it all, bun is simply faster.<p>So, if you want to write a bunch of `.ts` files and point something at them, I really recommend `bun` (and, frankly, why would you write `.js` in 2023? Probably because you&#x27;ve not tried bun.<p>Edit: I don&#x27;t care about bundle sizes, because I&#x27;m just using bun to run my @benchristel&#x2F;taste sub-second test suite.
评论 #35971936 未加载
评论 #35970085 未加载
brundolf大约 2 年前
Anybody using Bun in production yet? What&#x27;s your experience been like?
评论 #35968982 未加载
schemescape大约 2 年前
How big are the bundles (edit: I meant self-contained executables) and do they depend on glibc?<p>Edit: just saw a comment from the author indicating glibc is required.
评论 #35968235 未加载
dimgl大约 2 年前
I&#x27;ve been pretty jaded by Node.js lately, especially with all of the ESM and TypeScript stuff. This led me to try using Deno but Deno was missing the mark in a lot of ways.<p>Is Bun in a state where I can start thinking about replacing my Node.js production toolchains with it?
评论 #35968773 未加载
评论 #35967940 未加载
freddex大约 2 年前
Looks great! Still eagerly waiting for Windows support: I have a specific use case where I need both a bundler and a package manager to run on the user&#x27;s desktop cross-platform, and right now that&#x27;s yarn + esbuild. I&#x27;d love to roll this into a single, performant solution. It&#x27;s already being worked on as far as I know [1], excited to upgrade to Bun when that&#x27;s available.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;oven-sh&#x2F;bun&#x2F;issues&#x2F;43">https:&#x2F;&#x2F;github.com&#x2F;oven-sh&#x2F;bun&#x2F;issues&#x2F;43</a>
19h大约 2 年前
Funny to see improvements in crypto.createHash… I was totally caught off guard yesterday noticing most of crypto has been removed in Node 20 and replaced with the exclusively-async „subtle“ WebCrypto. Quite a pain to work with when you need synchronous code.
fluente大约 2 年前
It would be helpful to see how Bun&#x27;s minifier compares to the others with popular libraries:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;privatenumber&#x2F;minification-benchmarks">https:&#x2F;&#x2F;github.com&#x2F;privatenumber&#x2F;minification-benchmarks</a>
vaughan大约 2 年前
We need an equivalent Python Mojo for TypeScript.<p>This seems like the most obvious thing yet to be built.<p>I wonder how hard it would be to take an existing systems language and add TS syntax to it. Seeing as they are all built on LLVM. Or maybe you could transpile TS to Zig.
captainmarble大约 2 年前
Any plan on adding something likr Deno KV in Bun?
Aeolun大约 2 年前
Does it work with Prisma yet? I’m kinda waitjng for that to switch everything over.
unilynx大约 2 年前
import.meta.main (whether the current file is the &#x27;main&#x27; or just being required) looks interesting and like something I have wanted in the past, but not sure if it would actually be a good idea.<p>was it ever offered for standardisation?
评论 #35966248 未加载
dheera大约 2 年前
Why are we still minifying JavaScript? Is it only for obfuscation?<p>State-of-the-art HTTP servers already do a pretty damn good job gzipping stuff on the fly, do we need this garbage?<p>If it is for obfuscation, fine, can we just call it that?
评论 #35967540 未加载
评论 #35966882 未加载
评论 #35975616 未加载
评论 #35968101 未加载
0x445442大约 2 年前
&gt; Lots of bug fixes to Node.js<p>Does Node.js have lots of bugs still?
评论 #35977206 未加载
评论 #35975267 未加载
timetraveller26大约 2 年前
How does this compare to bite?
ShadowBanThis01大约 2 年前
Is WHAT? The title should tell us what the post is about. Why do we have to keep bringing this up? A title like this is a great way to miss out on a lot of views and reduce the usefulness of your post.<p>Let the downvoting of this simple observation begin.
评论 #35968719 未加载