solana-labs / rbpf

Rust virtual machine and JIT compiler for eBPF programs
Apache License 2.0
288 stars 173 forks source link

JIT: Windows not supported #217

Open joncinque opened 3 years ago

joncinque commented 3 years ago

The JIT only supports non-Windows targets:

https://github.com/solana-labs/rbpf/blob/c3dd3378785420251adcbf63915691ed9f8b8044/src/jit.rs#L934-L937

This issue is not pressing, nor is it a call to action. Instead, it can be used for tracking in other systems that may be blocked. I imagine a Windows-JIT will be difficult to implement because of all the POSIX-specific parts of the implementation, and yield very little reward.

Lichtso commented 3 years ago

It is not so much POSIX, as the only thing POSIX we are using is mmap / mprotect and there should be replacements for that on windows: https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/

The way bigger problem is that windows does not use the System V ABI like everybody else does. So all the x86 registers and the call stack work differently.