-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
What is the problem this feature would solve?
On Windows, long-running background applications are typically deployed as Windows Services managed by the Service Control Manager (SCM).
Currently, executables produced by bun build --compile are standard console binaries and cannot be registered as true Windows services. Users must rely on third-party wrappers (e.g. NSSM / WinSW), custom native service hosts, or Task Scheduler, which adds extra complexity and dependencies.
This makes it harder to deploy Bun-based agents and daemons cleanly on Windows.
What is the feature you are proposing to solve the problem?
Add native Windows Service support to Bun so a compiled Bun executable can run as a proper SCM service without external wrappers.
This could be exposed via a CLI flag or a Windows-specific runtime mode that integrates with the Windows Service lifecycle (start, stop, shutdown).
What alternatives have you considered?
- Third-party service wrappers (NSSM, WinSW)
- Writing a separate native service host
- Task Scheduler (not equivalent to SCM services)
- bun:ffi / cc (cannot provide a service entrypoint)
All require additional tooling outside of Bun.