Skip to content
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

to get windows 10 "cargo build" and "cargo run" after cloning #238

Closed
omac777 opened this issue Jan 14, 2020 · 8 comments
Closed

to get windows 10 "cargo build" and "cargo run" after cloning #238

omac777 opened this issue Jan 14, 2020 · 8 comments
Assignees

Comments

@omac777
Copy link

omac777 commented Jan 14, 2020

Ok so I understand if you try to build on windows 10,
it doesn't succeed because of the uds examples.

I simply commented uds-client and uds-server out of the Cargo.toml, then everything builds.

The other thing is the tls example tls-client and tls-server need a tweak to open the correct file path.
Currently the example points to "tonic-examples/data/" but that doesn't exist after cloning.
It needs to be changed to "./examples/data/" to find the .pem/.key files successfully for both the client and the server.

Maybe this will help some others to get this working successfully:

cmd.exe
"C:\msvc2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
cd C:\dev\msys64\home\davidm\vcpkg
powershell
### .\bootstrap-vcpkg.bat
### .\vcpkg install openssl:x64-windows
### .\vcpkg owns openssl
[Environment]::SetEnvironmentVariable("VCPKG_ROOT", "c:\dev\msys64\home\davidm\vcpkg", "Process")
[Environment]::SetEnvironmentVariable("VCPKGRS_DYNAMIC", "1", "Process")
[Environment]::SetEnvironmentVariable("PATH", "C:\dev\msys64\home\davidm\vcpkg\installed\x64-windows\tools\openssl;C:\msvc2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64;C:\msvc2019\BuildTools\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\msvc2019\BuildTools\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\msvc2019\BuildTools\Common7\IDE\;C:\msvc2019\BuildTools\Common7\Tools\;C:\ProgramData\Boxstarter;C:\Program Files\ImageMagick-6.9.3-Q16;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Symantec.cloud\PlatformAgent\;C:\ProgramData\chocolatey\bin;C:\Go\bin;C:\Users\davidm\.cargo\bin;C:\Users\davidm\AppData\Local\Microsoft\WindowsApps;C:\Users\davidm\go\bin;C:\Git;C:\Git\bin;C:\pipeline_virtenv\Scripts;L:\3D\Maya\Maya2015\scriptLib\bin;C:\ffmpeg;C:\radare2;C:\Users\davidm\go\bin;C:\msvc2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\msvc2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja", "Process")
$MyWorkDirPath = "C:\dev\msys64\home\davidm\tonic"
Start-Process -WorkingDirectory $MyWorkDirPath c:/dev/msys64/home/davidm/tonic/target/release/tls-server.exe -WindowStyle Maximized
Start-Process -WorkingDirectory $MyWorkDirPath c:/dev/msys64/home/davidm/tonic/target/release/tls-client.exe -WindowStyle Maximized

Cheers

@LucioFranco
Copy link
Member

it doesn't succeed because of the uds examples.

So the UDS example will panic on windows since we do not currently support uds through windows as far as I know. I didn't look too deep but it should be easy to port the example.

The other thing is the tls example tls-client and tls-server need a tweak to open the correct file path.
Currently the example points to "tonic-examples/data/" but that doesn't exist after cloning.
It needs to be changed to "./examples/data/" to find the .pem/.key files successfully for both the client and the server.

Good point we should fix this :) I'd accept a PR for this but can do it later as well.

@LucioFranco LucioFranco self-assigned this Jan 15, 2020
@mattsre
Copy link
Contributor

mattsre commented Jan 29, 2020

@LucioFranco I'll take a look at this as well, and see if I can submit a PR with fixes. Let me know if you've already gotten around to this.

@LucioFranco
Copy link
Member

@RetWolf I have not gotten to this exact thing yet but tonic should build on windows. Would love PRs that fix any problem :)

@mattsre
Copy link
Contributor

mattsre commented Jan 30, 2020

Ah I see the path problem was already fixed, was hoping to get that easy fix 😛. I've looked briefly over the UDS example, I can try to implement the example for UDS on Windows which was released back towards the end of 2017: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

@LucioFranco
Copy link
Member

@RetWolf great! The issue with windows uds support is that I don't think its upstreamed into tokio so we'd need to get that first. If that is the case then we should open a tracking issue in both tokio/tonic.

@mattsre
Copy link
Contributor

mattsre commented Jan 30, 2020

I've created tokio-rs/tokio#2201 in Tokio, if you'd like we can close this issue and create a more explicit issue tracking the feature in Tokio.

@LucioFranco
Copy link
Member

@RetWolf yes that would be perfect! Thank you! Ill close this issue now.

@mattsre
Copy link
Contributor

mattsre commented Jan 30, 2020

Tracking ticket created here: #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants