Closed TimmieTudor closed 1 year ago
pico.v is unlikely to ever support windows
this system is just not well fit for such low level networking optimizations (epoll, io_uring)
@medvednikov why not? There is an option for using select in pico, it is even included in the source code.
I managed to get it to compile on windows yesterday and integrate it successfully with vweb. I am getting a runtime access violation error on windows, but that is probably my fault.
It might not be as fast, but at least you could test it on windows and then deploy on linux.
@Casper64 then you did something I thought was impossible. I had no idea Windows supported select
.
I have also seen a picoev_select.c file in the C code of picoev, which seems to support Windows.
@Casper64 then you did something I thought was impossible. I had no idea Windows supported
select
.
Winsock(now Winsock 2 - so good, they made it twice) does for BSD-like sockets. I don't recall what the two iterations of a POSIX subsystem for Windows did before they were nuked, presumably it was kludged somehow.
Describe the bug
I am trying to run the pico.v example from v/examples/pico/pico.v, but it doesn't work on Windows
Expected Behavior
I expected the pico.v file to compile and run correctly without any issues.
Current Behavior
When I try to run the pico.v example using: v run pico.v I get the following output: C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picohttpparser/picohttpparser.c:19: warning: assignment from incompatible pointer type C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picohttpparser/picohttpparser.c:19: warning: assignment from incompatible pointer type
In file included from C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picoev/picoev.c:8: C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picoev/src/picoev_select.c:75: warning: function might return no value: 'picoev_w32_init' C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picoev/src/picoev.h:143: warning: cast between pointer and integer of different size C:/Users/tudor/Documents/v_windows_1/v/thirdparty/picoev/src/picoev.h:143: warning: cast between pointer and integer of different size
builder error: 'netinet/tcp.h' not found
Reproduction Steps
The code inside the v/examples/pico/pico.v file:
Reproduction steps in Command Prompt: C:\Users\tudor\Documents\v_windows_1\v\examples\pico>v run pico.v
Possible Solution
The header file <netinet/tcp.h> is required by picoev, but it was not found. Perhaps you can add it in V's thirdparty folder? Or you can explain me where to get the header file from. That is the only possible solution I can think of at the moment.
Additional Information/Context
As I said, the header file <netinet/tcp.h> is not available on my machine.
V version
V 0.3.4 80d404c
Environment details (OS name and version, etc.)
V full version: V 0.3.4 e2f18fc.80d404c OS: windows, Microsoft Windows 10 Home v19045 64-bit Processor: 4 cpus, 64bit, little endian,
getwd: C:\Users\tudor\Documents\v_windows_1\v\examples\pico vexe: C:\Users\tudor\Documents\v_windows_1\v\v.exe vexe mtime: 2023-05-28 08:25:53
vroot: OK, value: C:\Users\tudor\Documents\v_windows_1\v VMODULES: OK, value: C:\Users\tudor.vmodules VTMP: OK, value: C:\Users\tudor\AppData\Local\Temp\v_0
Git version: git version 2.39.0.windows.1 Git vroot status: weekly.2023.15-207-g80d404c2 .git/config present: true
CC version: Error: exec failed (CreateProcess) with code 2: The system cannot find the file specified. cmd: cc --version thirdparty/tcc: N/A