A temporary solution for running Bun on Windows. In case you don't have WSL or don't want to use it.
Mainly for development purpose. Not recommended for production.
Required tools:
npm install bun-windows-via-docker -g
-
Make sure Docker Desktop is running.
-
Use like a regular Bun CLI, example:
bun index.ts
-
Since Bun needs to access your current directory, you have to click
Share it
.
Since eventually Bun will be running inside a Docker container, you need to expose ports to access it. --windows-ports
is a special argument for this.
bun --windows-ports "3000,3001" index.ts