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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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