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

Make Trin compilable on Windows #739

Closed

Conversation

KolbyML
Copy link
Member

@KolbyML KolbyML commented May 12, 2023

What was wrong?

fixes Trin so that it can compile to windows

How was it fixed?

add cfg and add a few panics to clearly define what is not supported by windows so it can compile

@KolbyML KolbyML force-pushed the make-trin-windows-compilable branch from 7f8e9c4 to bb9fc39 Compare May 16, 2023 19:36
_discv5: Arc<Discovery>,
_history_handler: mpsc::UnboundedSender<HistoryJsonRpcRequest>,
) -> anyhow::Result<ServerHandle> {
panic!("Windows doesn't support Unix Domain Sockets IPC, use --web3-transport http")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems Windows support unix domain sockets since 2018: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ and there is a rust crate for it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to use that crate. Currently Reth uses tokio UnixStream so we can't use that crate. For tokio to add windows UDS it has to be added to MIO first I made a PR for it tokio-rs/mio#1667 but there is no telling when it will be merged if at all. This is a tokio windows UDS by Microsoft https://github.com/Azure/tokio-uds-windows but it hasn't been updated really in 5 years so it is hard to know if it is even maintained.

If we want we could maintain our own Windows Tokio UDS library I can have that ready by this week, but then we would also need to see if Reth would want to use that.

So yes Windows supports UDS (without pair), but it really isn't supported by any Rust libraries what suit Tokio.

So I think this is the best solution for now and maybe we can talk if maintaining a windows tokio UDS library and working with reth in the future. So my idea was merge this now and see if that is a overhead we would want to support in the future. (Unless we get lucky and get support from the Tokio team, but they seem uninterested)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, supporting windows at this stage is not a priority, so I don't think we should maintain our Windows Tokio UDS library.

Copy link
Member Author

@KolbyML KolbyML May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so either, which is why I don't think windows should support RPC via IPC

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

Successfully merging this pull request may close these issues.

2 participants