cxgo icon indicating copy to clipboard operation
cxgo copied to clipboard

Tool for transpiling C to Go.

Results 29 cxgo issues
Sort by recently updated
recently updated
newest added

I tried to transpile some C source from [this project](https://github.com/bestouff/genext2fs). Getting this panic: ``` /Users/prologic/tmp/genext2fs # cxgo file genext2fs.c panic: interface conversion: types.Type is types.IntType, not *types.StructType goroutine 1 [running]:...

bug

cxgo 2022/02/17 07:31:29 clonning https://github.com/skyrpex/potrace.git to C:\cygwin 64\tmp\potrace Cloning into 'C:\cygwin64\tmp\potrace'... remote: Enumerating objects: 151, done. remote: Counting objects: 100% (151/151), done. remote: Compressing objects: 100% (123/123), done. remote: Total...

bug

go version v1.17 ![image](https://user-images.githubusercontent.com/2398119/154391018-cb00f7d1-8b2c-498e-957c-97f514d367e1.png)

bug

``` sh $ cat nuklear.c #define NK_IMPLEMENTATION #define NK_INCLUDE_FIXED_TYPES #define NK_INCLUDE_STANDARD_IO #define NK_INCLUDE_DEFAULT_ALLOCATOR #define NK_INCLUDE_FONT_BAKING #define NK_INCLUDE_DEFAULT_FONT #define NK_INCLUDE_VERTEX_BUFFER_OUTPUT #include "nuklear.h" ``` `nuklear.h` is from https://github.com/Immediate-Mode-UI/Nuklear/blob/master/nuklear.h Output of `cxgo file...

bug

Currently `union` layout is ignored. Instead fields are flattened into the parent structure. Proper layout should be implemented at some point if we want to transpile ~anything that touches the...

enhancement

In C it's valid to have `struct foo` defined alongside with `void foo()`. When using cxgo this causes name collision. We should detect this case and append `_t` to a...

bug

Given the following C code: ``` struct hello { struct inside { int x; } stuff; }; ``` I get this Go code: ``` package main type hello struct {...

bug

Currently cxgo fails on Nuklear due to the fact that we erase types for nil values: ```c typedef int ptrdiff_t; #define NK_ALIGNOF(t) ((char*)(&((struct {char c; t _h;}*)0)->_h) - (char*)0) int...

bug

One thing that is missing from the project goals section in the documentation is the target use case. The use case makes a huge difference in how you approach the...

documentation