qmonnet / rbpf

Rust virtual machine and JIT compiler for eBPF programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make JIT usable on Windows

qmonnet opened this issue · comments

Would be great to have rbpf compiling on Windows.

Quoting @badboy:

AppVeyor is free and easy to setup as CI as well to run the build. The jitting might be incompatible, but the rest should probably work.

See issue #19.

If you give me push access to the repo I should be able to set it all up

Just added you as a “collaborator” on the repo, I think this gives you the permission to push?

So it seems it's not easy to compile on Windows: https://ci.appveyor.com/project/badboy/rbpf/build/job/9kmut2g40uto44qp

I could skip all jit things in Windows builds, but that would severly strip down the library

Yeah, having the JIT is great, but… I don't know if there is something equivalent on Windows to the posix_memalign() and mprotect() functions we're using, and don't really have time to investigate to be honest.

So I'd go for a “first step” without JIT on Windows, I think. Does it compile without the JIT?

According to various internet resources VirtualAlloc can be used. I used it, but now the test is simply failing (probably a memory access error? I'm no Windows dev, so that's out of my area).
Skipping the JIT on Windows also affects most of the tests.

AppVeyor was added with #23. Renaming the issue, for the record: JIT compilation remains to be adapted for Windows.

@badboy Where can I check if the Windows build was triggered, and if it was successful? Maybe there's some badge somewhere we can add to the README for quick access to the builds, do you know about that?

Hmm, it seems collaborator is not enough as I don't have the permissions to set any webhooks.
You can easily do so yourself though:

  1. Go to https://ci.appveyor.com/
  2. Login using your github account
  3. Add a new project, select this repository
  4. Check the settings, tick the "ignore branches without appveyor.yml" setting

In the settings you will also find a badge then. And from the overview page you can trigger a build.

Thanks!

I need to provide “Organizations and teams Read-only access” to AppVeyor in order to login with my GitHub account. I have to check that it's fine on my side, might take a couple of days before I add the project.

Hi @badboy, I'm sorry I let this issue slip out of my mind. The issue with the organizations being solved, I created an account on AppVeyor and added rbpf as a new project. The last commit added a badge to the README.md (can be blocked by add blockers, apparently).

Fixed by 4af0583

Reopening. I forgot the issue was about the JIT.

We have a new JIT that works on Windows (currently as an opt-in feature). #86