RWTH-ACS / cricket

cricket is a virtualization solution for GPUs
MIT License
140 stars 36 forks source link

Generating bindings for Cricket - missing headers #22

Closed nravic closed 1 year ago

nravic commented 1 year ago

Hello,

I'm working on generating bindings in Go for Cricket, but I can't do anything without access to some headers that are listed in .gitignore - namely cpu_rpc_prot.h.

Out of curiosity why are these excluded? Also can I work around this by using cpu_rpc_prot.x? Not really sure what the .x file extension is or what the file itself is doing.

Thanks!

n-eiling commented 1 year ago

Just do make cpu_rpc_prot.h. This should generate the header from the .x file. You need rpcgen for that. Have you had a look at https://github.com/gavrie/oncrpc? I am sure there are other projects.

nravic commented 1 year ago

Ah got it, I'll take a look at oncrpc too. Thanks!

Out of curiosity, not sure if I'm doing anything wrong here:

nravichandra@ubuntu:/Users/nravichandra/go/src/github.com/nravic/cricket-go/cricket/cpu$ rpcgen -C cpu_rpc_prot.x
        ptr_result rpc_register_function(ptr, ptr, string, string, int) = 50;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cpu_rpc_prot.x, line 216: only one argument is allowed

EDIT: nvm - got it, had to run make in the cpu directory. Thanks again