Skip to content

proposal: cmd/go: support build customization with a build.go file #20177

Closed
@docbrown

Description

@docbrown

Having used Rust and Cargo for a bit before coming back to Go for a new project, one thing I really miss is scripted builds. Cargo supports a build.rs file that is compiled and then run to do things like locate native dependencies and generate source files. The output of the build "script" specifies library search paths, compiler options, features (build tags), etc. It would be really great if something similar could be accomplished with Go projects fetched with go get and/or dep. I haven't really thought about the overall design or impact of such a feature, but Cargo's would be a good model to consider.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions