$ | >

Support *BSD operating systems.

One of the benefits of WSL is that many server environments are Linux systems and the developer can validate many changes locally before deployment.

Similarly, various *BSD variants (Free-, Open-, etc.) are also frequently used on servers and developers could benefit immensely from having similar functionality.

This will likely be a larger item than allowing multiple Linux distributions on WSL due to the differences in system call structure.

58 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Brett V. Forsgren shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Hayden commented  ·   ·  Flag as inappropriate

        WSL executes unmodified Linux binaries by emulating a Linux kernel interface on top of the Windows NT kernel. WSL translates the Linux syscalls to NT syscalls. This can be particularly challenging when that are not one-to-one matches between the Linux and NT kernels.

        In order to support the BSDs Microsoft would have to also emulate a BSD kernel interface on top of the NT kernel to interpret BSD syscalls.

        The first problem is that the BSDs implement syscalls using stack, not CPU registers like Linux and NT, which would require a lot of effort to translate between, likely diminishing any performance improvements from running a BSD.

        The second big problem is that unlike Linux each BSD implements syscalls slightly differently in their kernels. The WSB layer would have to know and be able to translate between OpenBSD, FreeBSD, NetBSD, and DragonflyBSD and NT syscalls.

        You're asking Microsoft to duplicate their existing effort to support BSDs and to introduce a massive degree of complexity, it's not clear you would get much better than the existing minimal Linux environments you can already install, either from the Microsoft Store or manually.

        I would recommend you just run a BSD environment in a container on top of WSL, which is already executing at near-native speed. Let qemu handle the syscall translations.

      • Aristotle Cajetan commented  ·   ·  Flag as inappropriate

        Theoretically, could someone from the WSL team go through what sort of differences you would have with WSL and BSD? I am just curious as to how that would work, I mean as far as licensing I know its the same issue. The only real reason why WINE in Linux is broken has to do with the API call that you would get in windows, which they can't be able to make because otherwise legal problems.

        It would be nice to simply have Microsoft assure Linux users, that using the API in the same manner Windows is now using Linux to get MacOS developers, and Linux developers back to Windows, or at least increase the productivity of Windows developers (a good thing). If that were the case, we would see much greater interoperability going both ways. Alright thanks! I myself, believe in what WSL is doing is going to be something good for the space. I really appreciate what you guys are doing, this is from a real rabid linux fan. I came back to windows, because I could finally have my familiar environment with the stability that windows offers, plus the network effect you guys have in the software side of things.

      Feedback and Knowledge Base