サーバサイドで実行可能なJavaScriptランタイム「Bun」は、2023年5月に登場したバージョン0.6で、単独の実行ファイルを生成できる「bun build」機能が搭載されました。 単独の実行ファイルは、Bunをインストールすることなく、そのまま実行可能です。 そして4月26日にリリースされたBun 1.1.5では、このBun buildの機能にクロスコンパイルの機能が追加されました。 Bun v1.1.5 - Fixes 64 bugs (addressing 101) - Cross-compile standalone JS/TS binaries - https://t.co/8hd5RVXz0H is bun's new crash reporter - package.json won't error on comments & trailing commas - Nod
JavaScriptランタイム「Bun 1.1」正式リリース。Windows版登場、Node.jsとの互換性向上、前バージョンより高速化など BunはJavaScriptとTypeScriptのランタイム機能を備えるだけでなく、トランスパイラ、バンドラ、タスクランナー、npm互換のパッケージマネージャなど、JavaScript/TypeScriptのツールチェーンを統合したソフトウェアです。 Bun 1.1ではこれまで提供されていたLinux版、macOS版に加えて、Windows版が追加されたのが最大の特徴です。 Bun 1.1でWindows版が登場 Bun 1.1はPowerShellから下記のコマンドで簡単にインストール可能です。画像左は、Bunの作者であるJarred Sumner氏。 Bunは以前から高速な動作も特徴の1つとして説明しています。下記はWindows上で「bun
Bun is a fast, all-in-one toolkit for running, building, testing, and debugging JavaScript and TypeScript, from a single script to a full-stack application. If you're new to Bun, you can learn more in the Bun 1.0 blog post. Bun 1.1 is huge update. There's been over 1,700 commits since Bun 1.0, and we've been working hard to make Bun more stable and more compatible with Node.js. We've fixed over a
JavaScript/TypeScriptランタイムの「Deno」を開発提供しているDeno Land Inc.は、モダンなJavaScriptおよびTypeScriptに最適化した新しいパッケージレジストリ「JSR」をパブリックベータとして公開しました。 現在、JavaScriptのパッケージレジストリは、Node.js用に構築され、GitHubが運営するnpm(Node Pacage Manager)が事実上の標準となっています。 参考:GitHubがnpmの買収を発表、JavaScriptのパッケージ管理サービス。将来的にはGitHubとnpmを統合へ npmにはさまざまな機能を備えたパッケージモジュールが大量に登録されており、この豊富なパッケージモジュールの存在がNode.jsの大きな利点となっています。そのため、現在ではDeno、Bun、Cloudflare Workersなど後
Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager — all in one. This release fixes 8 bugs. Bun.stringWidth(a) is a ~6,756x faster drop-in replacement for the popular "string-width" package. bunx now checks for updates more frequently. Adds expect().toBeOneOf() in bun:test. Memory leak impacting Prisma is fixed. Shell now supports advanced redirects like 2>&1, &
こんにちは、AIShift バックエンドエンジニアの石井(@sugar235711)です。 AIShiftでは去年の11月からAI Worker[1]という新しいサービスの開発が始まりました。(以下AI Worker) 本格的に開発が始まり3ヶ月弱経ったので、その間に試してきた技術やチームの取り組みについてまとめてみたいと思います。 はじめに この記事では、AI Workerのおおまかな概要・設計を説明し、それらのバックエンドを実現する上でどのような技術を試してきたのか、技術以外でのチームの取り組みについてまとめます。 少し分量が多いので、ライブラリについての情報を求めている方は、目次から気になる部分を読んでいただければと思います。 何を作っているのか ざっくりまとめると、Microsoft Teams/Web上で動くAIを活用した業務改善プラットフォームを作成しています。 GPTとRAG
TL;DR スマホでQRコードを読み込むプロフィール交換アプリを開発した。 イベントソーシングだったり Hono だったり、気になる技術を試せた。 アプリのレスポンスが速く、懇親会も盛り上がったのでよかった! はじめに レバテック開発部で基盤システムグループに所属している瀬尾です。 普段はマイクロサービスのつらみを味わったりしています。 昨年末に弊社で大規模な懇親会があり、そこでの交流を増やす目的として、互いの QR コードを読み取りプロフィールを交換するアプリを作りました。 この記事では、そのアプリをどんな技術でどのように開発していったかをご紹介しようと思います! 技術スタック 言語 Typescript Go(Lambdaで使用) フロントエンド Node.js Next.js, TailwindCSS バックエンド Bun Hono, Prisma イベントソーシング インフラ AW
JavaScriptランタイムのBunは、新機能としてシェルスクリプトをJavaScriptもしくはTypeScriptで記述し、特定のOSに依存せずに実行できる「Bun Shell」を発表しました。 シェルスクリプトは特定のシェルに依存するもの LinuxやmacOS、WindowsなどのOSは一般に、「シェル」(Shell)と呼ばれる機能を備えています。 シェルはコマンドラインインターフェイスなどのユーザーとの対話機能を備えており、例えばLinuxのコマンドラインで「ls」コマンドを打ち込むとファイルの一覧が返ってくるという動作はシェルが提供しています。 そしてシェルでは一般に、こうしたコマンドを複数つなげた一連の動作をスクリプトとして定義し実行できる「シェルスクリプト」が利用可能です。例えば、次のシェルスクリプトは、「ls」コマンドによるファイルの一覧をファイル「list.txt」に
Intro What is Bun? Installation Quickstart TypeScript Templating bun init bun create Runtime bun run File types TypeScript JSX Environment variables Bun APIs Web APIs Node.js compatibility Single-file executable Plugins Watch mode Module resolution Auto-install bunfig.toml Debugger Framework APISOON Package manager bun install bun add bun remove bun update bun link bun pm Global cache Workspaces L
JavaScript is the world's most popular scripting language. So why is it hard to run shell scripts in JavaScript? import { spawnSync } from "child_process"; // this is a lot more work than it could be const { status, stdout, stderr } = spawnSync("ls", ["-l", "*.js"], { encoding: "utf8", });
Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager — all in one. In case you missed it, here are some of the recent changes to Bun. This release fixes 9 bugs and adds Bun Shell, a fast cross-platform shell with seamless JavaScript interop. Fixes a socket timeout bug, a potential crash when socket closes, a Node.js compatibility issue with Hapi, a process.exit bu
はじめに こんにちは! @Yu_yukk_Y です! 先日Astroで作成した自身のブログのランタイムをbunに移行したのですが、実はそれまでの数ヶ月間Cloudflareでbunを使う方法がわからずにめっちゃ困っていました。。。 そこで、おそらく同じ悩みを抱えている人は自分の他にもいるだろうと思い、この機会に備忘録がてら記事にしてみることにしました! 記事の最後に移行後のビルド時間の比較も載せてあります! 元々の環境 パッケージマネージャー: pnpm フレームワーク: Astro v2.10.15(HybridモードでCloudflare Adapterを使って動作させています) Cloudflare Build System: v1 ランタイム: node v20.2.0 Cloudflare PagesとGithubを連携し、mainとdevelopブランチが更新されるとそれぞれ本
「日本人」を理由にしたくないし、「コードは全世界共通語」なのは分かっているけど、自分が日本人で日本語を母国語としていることはOSSにおいて不利になる。 この2年間のHonoの開発をしてきた経験で分かったことだ。 そこに目を瞑ってはいけないし、自覚することで世界と戦えるかもしれない。今回はそのことについて書こうと思う。 8k 現在、HonoのGitHubスター数は8,000を超えた。 これはとんでもない数字なんだけど、もっと伸びるべきで、早く1万を超えなくはいけない。 npmのダウンロード数は週間「46,000」とこれは相対的に低く、こちらも伸びるべきである。 数字が全てではないが、こうした数字は昨今のOSSにとって「一番の」指標であることは確かだ。 だから戦うことはこの数字を伸ばすことである。 なぜ「戦う」のか なんで「戦う」というおっかない言葉を使い、そして戦わなくてはいけないのか。 ま
はじめに bun installで生成されるBunのロックファイルはbun.lockbというバイナリファイルである。 公式を読むと性能向上のためにバイナリ化していることがわかる。 Why is it binary? In a word: Performance. Bun’s lockfile saves & loads incredibly quickly, and saves a lot more data than what is typically inside lockfiles. 困ること まさにこのツイートの問題で、Git管理したいのにバイナリが出力されるのは不便で、どうしよう? と実際の本番利用では困るだろう。 解決方法 案1. git diffで差分確認する 公式のページを読むと、どうやら設定追加でgit diffができるらしい。 bun install request g
はじめに Bunの1.0が発表されましたね! 自分はすでにいくつかのプロジェクトに導入したりして、とても気に入っています。 例えばこちらの自作プロジェクトでは、 node18 + pnpm + vitestからbunに移行したところ: Packageのインストールが8秒から0.5秒に vitestからbun testへの移行で5秒から0.3秒に tscによる型チェックが2.5秒から1秒に と、とても高速になりました。 またモノレポにも対応しているので、手元のプロジェクトたちを順次pnpmからbunに移行しています。 BunでペライチのCLI Toolを書く さて、BunにはAuto Installという機能があります。 これはスクリプトの先頭にあるimport文を解析し、必要なパッケージを自動でインストールしてくれる機能です。 例えば import { z } from 'zod' con
⚡️ 25x faster — Switch from npm install to bun install in any Node.js project to make your installations up to 25x faster. https://bun.sh/docs/cli/install という記述を見かけて直感的に、そうはならんやろと思ったものの実際にベンチマークをしているのでどういうことなのかを気になって調べた。 A global install cache. bun installを実行すると ~/.bun/install/cache/ 以下にnpmレジストリからダウンロードされたファイルの実体が展開されキャッシュされる(--cache-dirでパスを変更できる)。 キャッシュにはパッケージのバージョンごとのディレクトリとlatestのシンボリックリンクがある。こ
Projects using Bun as a package manager can now be deployed to Vercel with zero configuration. Like yarn, npm, and pnpm, Bun acts as a package manager focused on saving disk space and boosting installation speed. Starting today, Projects that contain a bun.lockb file will automatically run bun install as the default Install Command using bun@1. This change impacts the build phase but not runtime.
= Built-In = Core Ecosystem = Third Party = Experimental / Partial = N/A Footnotes As this table doesn't cover every single aspect, here are some noteworthy points: Node.js has started to implement a permissions model, available under a experimental flag in Node 20. Node.js does have an external dependency view through NPM list. Node.js has an alternative approach to Web Workers called Worker Thre
Notionには同期データベースとしてGitHubやJiraなどを同期できるDBがありますが、任意のサービスには対応していません。 もっと色々なサービスと同期するNotionのデータベースが欲しかったので、bluenotiondbというツールを作りました。 azu/bluenotiondb: Sync Bluesky/GitHub/Calendar/RSS to Notion. bluenotiondbは、色々なサービスからデータを取得してそのデータをNotionのデータベースに追加するツールです。 現状では次のサービスに対応しています。 Bluesky Pull Posts from Bluesky and push to Notion GitHub Activity Pull events of GitHub user and push to Notion Open/Close/Com
JSer.info #657 - Fresh 1.4がリリースされました。 Fresh 1.4 – Faster Page Loads, Layouts and More 事前コンパイルによるページ読み込みの改善、<head>/<head>/<body>タグを定義できるように、_layoutファイルのサポートが追加されています。 また、defineRoute/defineLayout/defineApp関数の追加、ルートグループという概念が追加されています。 Chrome 117 betaがリリースされました。 Chrome 117 beta - Chrome Developers CSSのアニメーションに関する改善、CSS Subgridのサポート、ECMAScript Stage 3のObject.groupBy/Map.groupByの実装、Iterator Helpersの実装など
Bun v0.8.0 adds debugger support, implements fetch streaming, and unblocks SvelteKit. ReadStream and WriteStream from node:tty are implemented, and .setRawMode() now works on process.stdin, unblocking several interactive CLI tools. Plus Node.js compatibility updates, bug fixes, stability improvements. Bun 1.0 is coming on September 7th! Register for the launch stream at https://bun.sh/1.0. Bun is
Bun is an all-in-one toolkitWe love JavaScript. It's mature, it moves fast, and its developer community is vibrant and passionate. It's awesome. However, since Node.js debuted 14 years ago, layers and layers of tooling have accumulated on top of each other. And like any system that grows and evolves without centralized planning, JavaScript tooling has become slow and complex. Why Bun existsBun's g
We're hiring C/C++ and Zig engineers to build the future of JavaScript! Join our team → Some may be surprised to see the recent release notes for Bun mention CommonJS support. After all, CommonJS is a legacy module system, and the future of JavaScript is ES Modules (ESM), right? As a "forward-thinking" "next-gen" runtime, why would Bun put so much effort into improving CommonJS support? The latest
JavaScriptランタイムのBun、インストール不要の実行ファイル生成が可能に。Webpackより200倍以上高速とするバンドラがβ版、Puppeteerにも対応 サーバサイドで実行可能なJavaScriptランタイム「Bun」は、5月に登場したバージョン0.6で、Bunをインストールすることなく、配置することでアプリケーションを実行できる単独の実行ファイルを生成できる「bun build」機能が搭載されました。 同じくバージョン0.6で高速なバンドラ「Bun Bundler」もβ版となり、6月に登場したバージョン0.6.7ではDiscordのボットを操作するDiscord.jsやWebブラウザを操作するPuppeteerなどの動作も確認されています。 下記はBunの開発者であるJarred Summer氏のツイート。 Standalone executables are coming
Two weeks ago, we launched our new JavaScript bundler in Bun v0.6.0. Today we're releasing a new feature that highlights the tight integration between Bun's bundler and runtime: Bun Macros. Macros are a mechanism for running JavaScript functions at bundle-time. The value returned from these functions are directly inlined into your bundle. As a toy example, consider this simple function that return
This is the biggest release of Bun yet. Bun now has a built-in JavaScript and TypeScript bundler and minifier. Use it to bundle frontend apps or bundle your code into a standalone executable. We've also been busy improving performance and fixing bugs as-per usual: writeFile() gets up to 20% faster on Linux, lots of bug fixes to Node.js compatiblity and Web API compatiblity, support for TypeScript
Cloudflare WorkersがNode.js API互換の提供を発表。Bun、Denoなどに続く対応により、Node.js APIはサーバサイドJavaScriptの事実上の標準になるか Cloudflareは、エッジでJavaScriptを実行できるサービス「Cloudflare Workers」において、Node.jsのAPI互換機能を提供すると発表しました。 node.js APIs have officially landed in Cloudflare Workers — no polyfills required. We've added AsyncLocalstorage, EventEmitter, Buffer, assert and util, with more on the way soon.https://t.co/8CkPZkS3Yb — Cloudfl
niという npm/yarn/pnpm/bun を同じコマンドでインストール/アンストールコマンドを実行できるツールがあります。 antfu/ni: 💡 Use the right package manager 仕組み的には、各パッケージのロックファイルやCorepackで決められたpackageManagerフィールドの値から、どのパッケージマネージャを使うかを判断しています。 たとえば、package-lock.jsonがあるプロジェクトなら npm を使ってるので、niコマンドは npm のコマンドを実行します。 また、packageManagerフィールドがyarn@<version>になっている場合は、niコマンドは yarn コマンドを実行します。 なぜこういうツールが必要になるかというと、npm や yarn などのパッケージマネージャは、それぞれのパッケージマネージャの
A version manager for all your favorite languages and tools. A unified toolchain. Supports Bun, Deno, Node (npm, pnpm, yarn), Rust, Go, and more.
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く