CosmWasm / optimizer

Dockerfile and script to deterministically produce the smallest possible Wasm for your Rust contract
Apache License 2.0
123 stars 61 forks source link

Bump to 0.11.5 with Rust 1.54.0 #51

Closed snoyberg closed 3 years ago

webmaster128 commented 3 years ago

Thank you for the PR! Diff looks good. Did you experience any improvements with the latest Rust version in the context of CosmWasm contracts?

snoyberg commented 3 years ago

I honestly haven't done any testing with it yet, sorry.

webmaster128 commented 3 years ago

Okay, no worries. We'll build this locally and have a look.

snoyberg commented 3 years ago

Thanks! Just to clarify: I did use this locally to build a project and run its integration tests, which passed. However, I haven't looked any deeper at potential improvements versus 1.53.0.

Really appreciate the work here on providing this Docker image!

uint commented 3 years ago

Looks like a mixed bag.

:+1: Filesize diff:

 -rwxrwxr-x. 1 tom tom  406 Jun 22 16:54 download_releases.sh
--rw-r--r--. 1 tom tom 175K Aug  2 12:38 hackatom.wasm
--rw-r--r--. 1 tom tom 278K Aug  2 12:39 ibc_reflect.wasm
--rw-r--r--. 1 tom tom 140K Aug  2 12:39 queue.wasm
+-rw-r--r--. 1 tom tom 168K Aug  2 12:46 hackatom.wasm
+-rw-r--r--. 1 tom tom 267K Aug  2 12:46 ibc_reflect.wasm
+-rw-r--r--. 1 tom tom 136K Aug  2 12:46 queue.wasm
 -rw-rw-r--. 1 tom tom  448 Jun 22 16:54 README.md
--rw-r--r--. 1 tom tom 267K Aug  2 12:39 reflect.wasm
+-rw-r--r--. 1 tom tom 254K Aug  2 12:46 reflect.wasm

:+1: Memory:

- SizeMemoryCache: (uint64) 2959476
+ SizeMemoryCache: (uint64) 2780244

:-1: Gas costs in wasmvm tests:

    lib_test.go:568: 
            Error Trace:    lib_test.go:568
            Error:          Not equal: 
                        expected: 0x84ad
                        actual  : 0x8719
            Test:           TestMultipleInstances
    lib_test.go:579: 
            Error Trace:    lib_test.go:579
            Error:          Not equal: 
                        expected: 0x8541
                        actual  : 0x87a7
            Test:           TestMultipleInstances
    lib_test.go:823: 
            Error Trace:    lib_test.go:823
                                    lib_test.go:582
            Error:          Not equal: 
                        expected: 0x75ab
                        actual  : 0x7b31
            Test:           TestMultipleInstances
    lib_test.go:823: 
            Error Trace:    lib_test.go:823
                                    lib_test.go:586
            Error:          Not equal: 
                        expected: 0xf089
                        actual  : 0xf2a6
            Test:           TestMultipleInstances
    lib_test.go:823: 
            Error Trace:    lib_test.go:823
                                    lib_test.go:595
            Error:          Not equal: 
                        expected: 0xf0c3
                        actual  : 0xf2e0
            Test:           TestMultipleInstances
webmaster128 commented 3 years ago

Released on DockerHub. Thanks!