<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think this proposal is a little more complicated than necessary.<div class=""><br class=""></div><div class="">Using Hypervisor directly doesn't really seem in the realm of the package manager to do, especially when there are nicely packaged tools like Docker for Mac which basically handle all of that.</div><div class=""><br class=""></div><div class="">I can imagine an interesting feature where the package manager had the ability to compile for Linux in one of two ways:</div><div class=""><br class=""></div><div class="">1. The approach described, using some kind of virtualization to be able to actually execute the build on Linux. This would have the advantage that the tests and executables could also be run. However, this would also be rather complicated and I'm not sure it is ultimately the right place to solve this problem.</div><div class=""><br class=""></div><div class="">2. We could support cross-compiling to Linux. This would fit clearly in our feature set, and would also be a lot easier to make robust and with a good user experience. However, this wouldn't help with the ability to run tests...<br class=""><div class=""><br class=""></div><div class="">In either case, I don't know of anyone actively trying to tackle features in these areas...</div><div class=""><br class=""></div><div class=""> - Daniel</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 13, 2016, at 5:46 PM, apps4u via swift-build-dev <<a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div class=""><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;" class="">HI I submited a proposal to the Swift Mailing list when it a build feature. So Ive inclued the original message but Im going to rewrite so I could be a bit more clear.<br class=""><br class=""><br class="">I have a propoal of using the new Hypervisor.framework to enable Swift Linux build's on Os X. So at the monment there is a need to use 3rd party tools (VM, Docker) to run a linux kernel on Os x to build Swift Liunx server app's. Now I was thinking that with the release of Hypervisor.framework that this could now be achive in a clean and transparent way.<br class=""><br class="">So the main idea is to have the abilty to create a linux target but when building and running instead of running on the Mac kernel a small liunx kernel can be started as a headless background process and the app would build and run within that vm. So the folder to the project could be mounted with in the Linux vm. Hypervisor.framework is perfect for this sort of enbeding. It could be inbeded as a XPC proecess so that Linux VM would be used for all project's.<br class=""> The target should be able to be configured by user to pick if it runs on OS X or Linux. <br class=""><br class="">This could Also be tied into the Package Manager where there could be a option to set the packages target runtime.<br class=""><br class="">Also to start with I don't think this would need to be under full user control, What I mean by that I would not let the user pick the Linux OS or packages that are installed etc. I think the Linux os should include a common set of software eg: CURL, OpenSSL , etc. just the common set of software.<br class=""><br class="">or if people think otherwise that it could have full user control of Linux OS and installed Software.<br class=""><br class="">But My thought is to keep it simple and small so its as fast as possiable and at the end of the Day user should always Test on the Production OS which can be done using the current method's of running Linux on a VM or Cloud provider or Container.<br class=""><br class="">I think that this would make the developer experance even better and add a valuable feature to Swift Package Manager.<br class=""><br class=""><br class="">Now Where I made the mistake in the other post to bring up XCode how this could then enable Builld/Run/Debug of a Linux target. I only brought that up to explain the current process which requires docker or some vm software to be setup and some build scripts to get it to work which is a bit of effort for each project.<br class=""><br class=""><br class=""><br class="">-------------------------------------------------------------------------------------------------------<br class="">-------------------------------------------------------------------------------------------------------<br class="">FROM SWIFT MAILING LIST<br class="">-------------------------------------------------------------------------------------------------------<br class="">-------------------------------------------------------------------------------------------------------<br class=""><br class="">Sorry I just noticed the Swift Build mailing list . would that be a better place . Now Xcode would not need to be inclued as that's a apple product so Im was just using a example on how it could be use the Main feature request is to have Swift build use Hypervisor.Framework to work with Swift build to be able to build a Linux project on Os X with out having to create your own VM or container to run a linux kernel.<br class=""><br class="">So Im going to send this to the Swift Build Mailing list.<br class=""><br class="">August 14 2016 10:17 AM, "Félix Cloutier" <<a target="_blank" tabindex="-1" href="mailto:%22F%C3%A9lix%20Cloutier%22%20<felixcca@yahoo.ca>" class="">felixcca@yahoo.ca</a>> wrote:<blockquote class="">The swift-evolution mailing list is about the language itself, Xcode is independent. I don't know where you could try to push that suggestion.<br class=""><br class="">Félix<br class=""> <blockquote type="cite" class="">Le 13 août 2016 à 16:40:42, apps4u via swift-evolution <<a target="_blank" tabindex="-1" rel="external nofollow" href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :<br class="">I have a Proposal but I'm not sure if Its the right place to propose but as it has to do with building Swift So I'm going to submit here. So Please let me know if that is not the place to propose this feature. As it includes Xcode.<br class=""><br class=""><br class="">Ok So this is a proposal for being able to build swift for linux on Mac Os X in Xcode just like a native target.<br class=""><br class="">With the release of Hypervisor.framework It would be good if from within Xcode I can create a project with a Linux Target and when clicking Build and run it create a VM running a small linux Kernel using Hypervisor.framework. <br class="">By using Hypervisor.framework it would be better integrated into the tools as it has a small foot print. The idea would be to have the VM downloaded before a build. The linux VM should be small and only have the required software to test a server and using the hypervisor.framework the project build folder can be attached to the vm at build time so the working with different projects at the same time would not require lots of VM. <br class=""><br class="">Now I know that this would be best if integrated into Xcode and this is the Swift Language mailing list but Swift build is part of the Language.<br class=""><br class="">This could also be used to debugging. Now Its possible now to use Docker to run a linux vm and have a shared folder for your project and some scripts to kick off the build. But it take time to setup per project and is not the Experience i would expect in Xcode.<br class=""><br class="">Now My first thought when I found out about Hypervisor.framework that the reason it was created was to add linux targets to Xcode.<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a target="_blank" tabindex="-1" rel="external nofollow" href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a target="_blank" href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></blockquote></blockquote></div></div>
_______________________________________________<br class="">swift-build-dev mailing list<br class=""><a href="mailto:swift-build-dev@swift.org" class="">swift-build-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-build-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>