On Tue, Feb 16, 2021 at 10:52 PM
ben...@gmail.com <
ben...@gmail.com> wrote:
> Jan, is there any write-up about
modernc.org/sqlite? I've dabbled in automated conversion, and I'm very curious if there's more information about how it works, any pitfalls / unsupported stuff, etc, but having trouble finding anything like that in the repos.
The transpiller:
C Front end:
https://pkg.go.dev/modernc.org/cc/v3
Go back end:
https://pkg.go.dev/modernc.org/ccgo/v3
How it works:
The front end produces type annotated ASTs for the translation units,
the back end links the ASTs and renders them as Go code.
Pitfalls:
The linker is memory only and memory hungry. ccgo has not yet any
object file format for separating the compilation and linking phases.
Unsupported:
Most gcc extensions. Many C99-specific things. They are being added as
needed when I run into a blocking issue with some C -> Go project.
Recently for example:
https://gitlab.com/cznic/tk
Feel free to ask more specific questions. Perhaps off-list or at the
issue tracker(s). There are also Slack channels #sqlite and
#modernc_cc at
gophers.slack.com.