A tool for converting C to Go. The goals of this project are to create a generic tool that can convert C to Go. To be cross platform (linux and mac) and work against as many clang versions as possible (the clang AST API is not stable). To be a repeatable and predictable tool (rather than doing most of the work and you have to clean up the output to get it working.) To deliver quick and small version increments. The ultimate milestone is to be able to compile the SQLite3 source code and have it working without modification. This will be the 1.0.0 release. The c2go program processes a single C file and outputs the translated code in Go. The C code is preprocessed with clang. This generates a larger file (pp.c), but removes all the platform-specific directives and macros.

Features

  • Clang compiles the C to a binary as normal
  • c2go converts the C file to Go
  • The Go is built to produce another binary
  • Both binaries are executed and the output is compared
  • All C files will contain some output so the results can be verified
  • c2go requires Go 1.9 or newer

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow c2go

c2go Web Site

Other Useful Business Software
Earn up to 15% annual interest with Nexo. Icon
Earn up to 15% annual interest with Nexo.

Let your crypto work for you

Put idle assets to work with competitive interest rates, borrow without selling, and trade with precision. All in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of c2go!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-25