Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminating build dependency on Go #13

Open
inejge opened this issue Dec 3, 2018 · 4 comments
Open

Eliminating build dependency on Go #13

inejge opened this issue Dec 3, 2018 · 4 comments

Comments

@inejge
Copy link
Contributor

inejge commented Dec 3, 2018

Currently, building Mundane requires Go 1.11+. Utilities in Go are used for three tasks:

  1. Generating the interned error message bundle and its index (crypto/err_data.c in the build tree, from crypto/err/*.errordata in the source tree).

  2. Extracting the names of public symbols from the archive created in the first library build (crypto/libcrypto.a) and saving the result in symbols.txt above the two build directories.

  3. Generating the headers with substitutions from regular to versioned symbol names, using the result of the previous utility.

Those are rather simple programs and I have reimplemented them in Rust without much difficulty. Integrating them into build.rs could lead to elimination of Go as a build dependency of Mundane. While having any single dependency is not particularly onerous, I believe that minimizing their number eases the acceptance of a package, both for developers and end users. Even more so since Go 1.11 is not available on current LTS versions of popular distros.

Would there be any interest of pursuing this further?

@joshlf
Copy link
Member

joshlf commented Dec 4, 2018

I would absolutely be interested in this! I'm particularly interested in (2) and (3), as I expect I should be able to pre-generate crypto/err_data.c at code commit time.

Also, if you're interested in taking this one step further (not necessarily now, but at some point in the future), I've been hoping to eliminate the need for the two-phase build entirely by updating the libcrypto.a file in place in order to rename symbols. That's probably a much more involved project, but just wanted to put it on your radar in case you're curious.

@Ralith
Copy link
Contributor

Ralith commented Sep 3, 2019

It looks like (2) and (3) were fixed in 504093a and d0e5361 respectively. Should this be closed, or do we want to write a rust script for (1) too?

@joshlf
Copy link
Member

joshlf commented Sep 3, 2019

IIUC, we'll still need (1) in order to fully remove the dependency on Go, even if we remove CMake and drive the compilation manually from the build script. @davidben, correct me if I'm wrong on that?

@BusyJay
Copy link

BusyJay commented Jun 5, 2020

You can use the branch "master-with-bazel" or "chromium-stable-with-bazel" maintained by boringssl team to get rid of go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants