-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine wslbridge2 and hvpty #11
Comments
I would not worry about startup performance, certainly not due to neglectable software details. |
I think most of wslbridge users uses wslbridge for launching a login shell instead of running hundreds of commands under Cygwin, so I don't think startup performance is critical. |
Also, If it is possible to let the backend tell the frontend what the WSL version is? |
The idea is good but the such method is different between them. I'll think about it. First I'm focusing on remaining issues. |
Also, is it possible to use |
|
There are some issues with IP addresses in WSL2. I want to add those IP addesses in |
Do you mean also use |
@dxhisboy code added. Can you test for any bug? There would be a release in 2 days. |
Sorry, I'm travelling these days. Maybe I can have a try after Oct. 8. |
backends are combined. Suggestions needed for frontends. |
Great work! |
Thank you for the reply. Here are my thoughts:
|
I made a little experiment and I now agree to start from |
** See WslReverse for the history lesson :) |
Also, a little question, why do you use |
Welcome to cygwin tricks :) https://cygwin.com/ml/cygwin/2019-10/msg00114.html
Is it necessary the class is instantiated once? |
I think pointing a static pointer initially to |
I'd rather test for bit 3 (0x08) as higher bits might be used for other purposes in future.
I'd suggest not to over-engineer this fine but small tool. We're not doing object-oriented system design here. |
I think so, but, how to know, we should do |
I briefly merged the frontend on |
@mintty The idea is good. If higher bits is used in future I will change it. I speculate that MS devs are moving from using registry. If you follow the current WSL developments you can see the default uid and kernel commandline are now configured in
Any programming hacks are greatly appreciated until it does not affect performance. |
Combination completed. Need hardcore testing. |
Makefile still wants hvpty which is gone. |
From @dxhisboy's query:
The Another alternative way is to use WSA- prefixed functions, for example |
Not sure. Maybe you need a ldscript to ensure this. By default,
When I add |
This is what |
I do not think |
Also, it is not required to pass the full path of
Maybe just write missing |
Thank you all. |
Topic: Combine wslbridge2 (for WSL1) and hvpty (for WSL2) into one binary both for backend and frontend. They share most of the option processing and how
wsl.exe
executes the backend. The difference is the socket in use -- wslbridge2 uses AF_INET (wrapped by cygwin) but hvpty uses raw AF_HYPERV from winsock. Also the multi-threading execution is different between them.Pros:
Cons:
To do:
Problems:
WslGetDistributionConfiguration()
function but the valuewslDistributionFlags = 15
for WSL2 is not documented ( see Update documentation for WSL_DISTRIBUTION_FLAGS for WSL2 microsoft/WSL#4251).Conclusion: Throw your suggestion or idea on how to solve this. Any suggestions are greatly appreciated 🤗
The text was updated successfully, but these errors were encountered: