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

Add deterministic build system #268

Closed
ethanfrey opened this issue Sep 8, 2020 · 5 comments
Closed

Add deterministic build system #268

ethanfrey opened this issue Sep 8, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ethanfrey
Copy link
Member

This lets us get deterministic binaries.

cosmos/cosmos-sdk#7247 is a very nice example for the go part. We will need to ensure a deterministic build system for the rust dll as well, but piece by piece

@ethanfrey
Copy link
Member Author

They just overhauled the gaia build system to a simpler version. We should use that as reference when we start on this issue.

https://github.com/cosmos/gaia/pull/523/files

@yihuang
Copy link

yihuang commented Apr 23, 2021

Is it possible to statically link the libwasmvm library? not familiar with golang's build system, but static link should make it easier to redistribute binary.
Also I'd like to make a nix expression for wasmd, static link also make it easier, no need to manipulate rpath stuff.

EDIT: I thought golang can somehow magically build rust library on the fly, it turns out the prebuilt library is included in the repository directly(https://github.com/CosmWasm/wasmvm/blob/main/api/libwasmvm.dylib) 😄

@ethanfrey
Copy link
Member Author

Look at the Docker build in the repo. It does static.

With glibc systems we can only build rust dll, which dynamically link to Go. With muslc (alpine), we can make a static build of rust and thus a static build of the wasmd binary.

We only include the dlls (not static libs) in wasmvm due to size.

I spent several days trying to get static builds to work and using muslc based docker was the best I got. I would be very happy if you can figure out how to build a static lib of wasmvm on a glibc system (ubuntu, Debian, centos, etc)

@ethanfrey ethanfrey added this to the v1.x.0 milestone Mar 17, 2022
@alpe alpe moved this to 🆕 New in wasmd backlog Sep 28, 2022
@alpe
Copy link
Contributor

alpe commented Sep 30, 2022

This is a very old issue. gaia has moved away from gitian meanwhile. I found the docker approach that was used by terra very nice.
The container provides the "identical environment" to build the binary artifact.
Should be easy to add a new target to the Makefile

@alpe alpe moved this from 🆕 New to 📋 Unsorted Backlog in wasmd backlog Sep 30, 2022
@pinosu pinosu self-assigned this Dec 16, 2022
@pinosu
Copy link
Contributor

pinosu commented Dec 21, 2022

Closing because not relevant.
See this comment

@pinosu pinosu closed this as completed Dec 21, 2022
Repository owner moved this from 📋 Unsorted Backlog to ✅ Done in wasmd backlog Dec 21, 2022
@alpe alpe removed this from wasmd backlog Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants