futhark
futhark copied to clipboard
Automatic wrapping of C headers in Nim
Hello, I am trying to create wrappers for efl libaries starting with Elementary https://git.enlightenment.org/enlightenment/efl/src/branch/master/src/lib/elementary The only problem I am having is that when I want to wrap Elementary.h there is...
For example: ```c #define LRESULT long ``` Gets turned into something like: ```nim when not declared(Lresult): when long is typedesc: type Lresult* = long ## Generated based on /home/dian/Projects/nsciter/sciter-js-sdk/include/sciter-x-types.h:71:11 else:...
Recently updating from a library version to another and it'd be nice if one could force Opir to rerun. This could use `compileOption"forceBuild"` to align with the compiler's force rebuild...
On Windows nimble creates `bin.cmd` files in the ~/.nimble/bin folder instead of symlinks with the contents: ```cmd @chcp 65001 > nul @"%~dp0\..\pkgs\futhark-0.6.1\opir.exe" %* ``` Futhark executes opir with just `opir`,...
It's not really an issue in Futhark, but it affects Futhark and I figured it'd be worth reporting it to maybe add a workaround or at least let others know....
I am trying to use [this struct](https://github.com/smarco/WFA2-lib/blob/913447a95cf80dbb11d0c1c2cd8b652fe9a1b8bb/wavefront/wavefront_attributes.c#L37) which has default values. it's just [externed](https://github.com/smarco/WFA2-lib/blob/913447a95cf80dbb11d0c1c2cd8b652fe9a1b8bb/wavefront/wavefront_attributes.h#L154) in the header. I've manually set the defaults in nim because the futhark version of `wavefront_aligner_attr_default`...
Attempting to wrap wasmedge for instance fails due to hitting `__int128`. The following is what I'm using if it helps. In this API one does not directly touch the data...
This might be helpful to add
This is just one of my test cases for checking that Futhark works. Figured it might be useful for others to have it on a more easily runnable form, but...
Futhark converts C definitions of function pointers inside structs that are defined as separate types to `ptr FunctionType` instead of just `FunctionType`. For example with this C header: ```c typedef...