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

feat: bump up wasmvm from v1.1.1 to v1.4.1 #136

Merged
merged 285 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
285 commits
Select commit Hold shift + click to select a range
3808fac
Merge pull request #375 from CosmWasm/run-gofumpt-v0.4.0-in-ci
webmaster128 Dec 5, 2022
ba3ecc0
[skip ci] Built release libraries
Dec 5, 2022
6fc7251
Rename CI job test -> wasmvm_test
webmaster128 Dec 1, 2022
5a2acfe
Bump Min Rust compiler to 1.60.0
webmaster128 Dec 1, 2022
f788dbe
Bump Tooling Rust compiler to 1.65.0
webmaster128 Dec 13, 2022
782e705
Update cargo-audit version
webmaster128 Dec 13, 2022
cbd991c
Merge pull request #378 from CosmWasm/bump-min-rust-1.60.0
webmaster128 Dec 13, 2022
c5cf9a8
Move KVStore, GoAPI, GasMeter to types
webmaster128 Dec 13, 2022
6aa5c73
Pull out lib_no_cgo.go
webmaster128 Dec 13, 2022
f6903fb
Update project structure documentation
webmaster128 Dec 13, 2022
7441eab
Add no-cgo CI jobs
webmaster128 Dec 13, 2022
d82b07d
Fix types in test code
webmaster128 Dec 13, 2022
d55a2eb
Rename job no-cgo -> wasmvm_no_cgo
webmaster128 Dec 13, 2022
64c97a8
[skip ci] Built release libraries
Dec 13, 2022
641a6eb
Add no-cgo testing
webmaster128 Dec 15, 2022
02dfade
Pull out libwasmvmVersionImpl
webmaster128 Dec 15, 2022
978e810
Merge pull request #377 from CosmWasm/non-cgo
webmaster128 Dec 15, 2022
8b50ef7
[skip ci] Built release libraries
Dec 15, 2022
5cb3385
fix link rot in spec files
dzmitry-lahoda Dec 16, 2022
e18ff3f
Test libwasmvm on Windows
webmaster128 Jan 9, 2023
e4f2e2d
Upgrade cosmwasm to 1.2.0-beta.1
webmaster128 Jan 9, 2023
450e534
Update test case removing file system internal error information
webmaster128 Nov 23, 2022
fd507a9
Upgrade testing contracts and expected resource usage
webmaster128 Jan 9, 2023
8c7bf6c
Rename createTestContract -> createHackatomContract in api package
webmaster128 Dec 6, 2022
63c0ad7
Add and test VoteWeighted
webmaster128 Jan 10, 2023
c7ae64b
Add comment on VoteMsg.Vote naming
webmaster128 Jan 10, 2023
2b6d991
Add Instantiate2Msg
webmaster128 Jan 10, 2023
1b8f280
Rename features -> capabilities in cache.rs
webmaster128 Jan 10, 2023
5cc3dce
Add RemoveCode
webmaster128 Jan 11, 2023
dc394f3
Add support for CodeInfoQuery
webmaster128 Jan 11, 2023
2a5f235
Add NoSuchCode error
webmaster128 Jan 11, 2023
2efbd18
Add createCyberpunkContract
webmaster128 Jan 12, 2023
0cf3630
Test panic and unreacable
webmaster128 Jan 12, 2023
23b9b74
Upgrade CosmWasm to v1.2.0-rc.1
webmaster128 Jan 12, 2023
1809ec5
Merge pull request #380 from CosmWasm/cosmwasm_1_2
webmaster128 Jan 16, 2023
c4d9e6b
[skip ci] Built release libraries
Jan 16, 2023
cccfc12
Test directory creation behavior in InitCache
webmaster128 Jan 16, 2023
f99ac2c
Merge pull request #382 from CosmWasm/test-directory-creation
webmaster128 Jan 16, 2023
2ff3f79
[skip ci] Built release libraries
Jan 16, 2023
00108f0
Use cpu_loop from cyberpunk.wasm
webmaster128 Jan 16, 2023
af31ea6
Remove duplicate InitCahce test from TestInitAndReleaseCache
webmaster128 Jan 16, 2023
8da8e05
Implement TestExecuteCpuLoop via cyberpunk
webmaster128 Jan 16, 2023
baf412b
Merge pull request #383 from CosmWasm/better-testing
webmaster128 Jan 16, 2023
94fc9b8
[skip ci] Built release libraries
Jan 16, 2023
6c2b56f
Add UnmanagedVector::some and UnmanagedVector::none
webmaster128 Dec 5, 2022
5641b57
Merge pull request #384 from CosmWasm/unmanaged-vec-construct-and-test
webmaster128 Jan 17, 2023
af085b6
[skip ci] Built release libraries
Jan 17, 2023
b859b72
Add devtools/set_version.sh
webmaster128 Jan 17, 2023
d2c9360
Set libwasmvm version: 1.2.0-rc.1
webmaster128 Jan 17, 2023
a2a2615
Fotmat set_version.sh, move waiting statement, fix TAG variable
webmaster128 Jan 17, 2023
8f61d9f
[skip ci] Built release libraries
Jan 17, 2023
c241788
Bump ubuntu-2004 version and debug go version
webmaster128 Jan 17, 2023
a6a7254
Merge pull request #385 from CosmWasm/ubuntu-2004-bump
webmaster128 Jan 17, 2023
67c582f
[skip ci] Built release libraries
Jan 17, 2023
cd8425c
Fix ghr installation
webmaster128 Jan 17, 2023
44ceca1
[skip ci] Built release libraries
Jan 17, 2023
1635da2
builds: build static library for macos
helder-moreira Jan 18, 2023
df55c0a
Bump bumpalo from 3.8.0 to 3.12.0 in /libwasmvm
dependabot[bot] Jan 20, 2023
b18fe84
Merge pull request #388 from CosmWasm/dependabot/cargo/libwasmvm/bump…
webmaster128 Jan 23, 2023
2555201
[skip ci] Built release libraries
Jan 23, 2023
ee2203f
Deactivate .dll build in CI
webmaster128 Jan 23, 2023
8530411
Removed checked in wasmvm.dll
webmaster128 Jan 23, 2023
4e04042
Update compatibility table
webmaster128 Jan 23, 2023
ab0eddf
Format README
webmaster128 Jan 23, 2023
74748fe
Merge pull request #390 from CosmWasm/deactivate-dll-build
webmaster128 Jan 23, 2023
b0c6aab
[skip ci] Built release libraries
Jan 23, 2023
ad52d61
Avoid FFI calls for creating errmsg vectors that are not used
webmaster128 Dec 5, 2022
3451740
Merge pull request #391 from CosmWasm/avoid-unused-vectors
webmaster128 Jan 23, 2023
0d67f6d
[skip ci] Built release libraries
Jan 23, 2023
d323e99
chore: move darwin static build to separate example
helder-moreira Jan 23, 2023
0717afa
Change default value for replyOn and voteOption
webmaster128 Jan 24, 2023
7ef52d4
Merge pull request #392 from CosmWasm/create-unset-enum-value
webmaster128 Jan 24, 2023
557e85f
[skip ci] Built release libraries
Jan 24, 2023
36aad8e
Upgrade cosmwasm to 1.2.0
webmaster128 Jan 24, 2023
e40871d
Set thiserror version explicitely
webmaster128 Jan 24, 2023
639a14a
Set serde_json version explicitly
webmaster128 Jan 24, 2023
b25603b
Set hex version explicitly
webmaster128 Jan 24, 2023
23d9b43
Clear outdated CHANGELOG file
webmaster128 Jan 24, 2023
fd10182
Merge pull request #393 from CosmWasm/cosmwasm-1.2.0
webmaster128 Jan 24, 2023
0a8704b
Bump wasmvm to 1.2.0
webmaster128 Jan 24, 2023
6cf6956
[skip ci] Built release libraries
Jan 24, 2023
be1db4b
Merge pull request #394 from CosmWasm/bump-wasmvm-version
webmaster128 Jan 24, 2023
825dcea
[skip ci] Built release libraries
Jan 24, 2023
ec5bef5
Print panic information to STDERR for panic in libwasmvm Rust code
webmaster128 Jan 26, 2023
9b166ae
Use alias cu64 consistently
webmaster128 Jan 26, 2023
7f2b28d
Merge pull request #396 from CosmWasm/print-panics
webmaster128 Jan 26, 2023
9e222b7
Merge pull request #397 from CosmWasm/use-cu64-consistently
webmaster128 Jan 26, 2023
753fb68
[skip ci] Built release libraries
Jan 26, 2023
a0bb1f6
Upgrade cosmwasm to 1.2.2
webmaster128 Mar 8, 2023
50c0f36
Upgrade tempfile
webmaster128 Mar 8, 2023
379ba5a
Merge pull request #406 from CosmWasm/update-cosmwasm-and-tempfile
webmaster128 Mar 8, 2023
24a1418
[skip ci] Built release libraries
Mar 8, 2023
78f9a41
Merge pull request #387 from NibiruChain/main
webmaster128 Mar 8, 2023
30a4edc
[skip ci] Built release libraries
Mar 8, 2023
9ceef71
Inline Iterator interface
alpe Mar 7, 2023
b54ad58
Remove tendermint-db dependency
alpe Mar 7, 2023
cd6e131
Merge pull request #405 from CosmWasm/404_tm-db
webmaster128 Mar 8, 2023
7c721b3
[skip ci] Built release libraries
Mar 8, 2023
e7b68fc
Set libwasmvm version to 1.2.1
webmaster128 Mar 8, 2023
a9e26c0
[skip ci] Built release libraries
Mar 8, 2023
985f601
Format README
webmaster128 Mar 27, 2023
5266d78
Prepare builders version 0015
webmaster128 Mar 27, 2023
df4437b
Rename FEATURES to CAPABILITIES
webmaster128 Apr 3, 2023
67b6ebe
Add field name to UFraction{ to make linter happy
webmaster128 Apr 3, 2023
48f0aa4
Merge pull request #414 from CosmWasm/rename-to-capabilities
webmaster128 Apr 5, 2023
ac33f56
[skip ci] Built release libraries
Apr 5, 2023
efacf16
Copy shared libs to artifacts folder
webmaster128 Apr 5, 2023
835f06a
Avoid storing artifacts (unused)
webmaster128 Apr 5, 2023
bb8ca81
Move Collect artifacts to publish step
webmaster128 Apr 5, 2023
f0a74f9
Add comment about publishing
webmaster128 Apr 5, 2023
e9bbe9f
Set CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse in build scripts
Apr 5, 2023
dc72187
Use build_macos_static.sh from container
Apr 5, 2023
35553ea
Merge pull request #411 from CosmWasm/builders-0015
webmaster128 Apr 5, 2023
e120838
Merge pull request #415 from CosmWasm/copy-shared-libs-to-artifacts-f…
webmaster128 Apr 5, 2023
8902cbd
[skip ci] Built release libraries
Apr 5, 2023
46d2dae
Make CHANGELOG text friendlier
webmaster128 Mar 27, 2023
3577d47
Upgrade cosmwasm to 1.2.3
webmaster128 Mar 27, 2023
b802c4f
Set libwasmvm version to 1.2.2
webmaster128 Apr 5, 2023
6663484
Merge pull request #412 from CosmWasm/wasmvm-1.2.2
webmaster128 Apr 6, 2023
7db6c12
[skip ci] Built release libraries
Apr 6, 2023
c2855c9
Add libwasmvm check to demo binary
webmaster128 Apr 12, 2023
890f653
Merge pull request #418 from CosmWasm/version-check-binary
webmaster128 Apr 12, 2023
a2cb78b
[skip ci] Built release libraries
Apr 12, 2023
a9484be
Build shared libraries on release branches
webmaster128 Apr 16, 2023
a0ae2c1
[skip ci] Built release libraries
Apr 16, 2023
4514698
Temporarily disabled libwasmvm_sanity_windows for 1.2 builds
webmaster128 Apr 18, 2023
8c66f0b
[skip ci] Built release libraries
Apr 18, 2023
db9d4a6
Update cosmwasm to 1.2.4
webmaster128 Apr 18, 2023
aafd5c7
Set libwasmvm version to 1.2.3
webmaster128 Apr 18, 2023
61e41ae
[skip ci] Built release libraries
Apr 18, 2023
1534b62
types: Add AllDenomMetadata BankQuery
nik-suri Mar 24, 2023
3013e81
types: Add DenomMetadata BankQuery and response type for AllDenomMeta…
nik-suri Mar 29, 2023
1c6f404
Merge branch 'release/1.2.x'
webmaster128 Apr 20, 2023
347b6bb
[skip ci] Built release libraries
Apr 20, 2023
b2bbab0
lint the wasmvm repository
faddat Apr 25, 2023
0298462
Update internal/api/lib_test.go
faddat Apr 26, 2023
a519bde
Modify usedGas
webmaster128 May 2, 2023
0fa15d7
Merge pull request #429 from CosmWasm/lint-repo-simon
webmaster128 May 2, 2023
818281c
[skip ci] Built release libraries
May 2, 2023
9825f43
Use simplified pagination type
chipshort May 31, 2023
b572c1d
Return next key in paginated metadata response
chipshort May 31, 2023
6f1bef7
Use uint32 for pagination limit
chipshort Jun 9, 2023
590fae2
Apply pr feedback
chipshort Jun 12, 2023
bd569ca
Update dependencies in Cargo.lock
webmaster128 Jun 28, 2023
5c15c6d
Bump cargo-audit and Tooling Rust compiler
webmaster128 Jun 28, 2023
adaa809
Merge pull request #435 from CosmWasm/upgrade-deps
webmaster128 Jun 28, 2023
d558963
[skip ci] Built release libraries
Jun 28, 2023
0dfa721
Remove executable flag from build script in source
webmaster128 Apr 6, 2023
28e7e02
Split linux build scripts and remove default script from Docker
webmaster128 Apr 6, 2023
16f71de
Reduce image size
Apr 6, 2023
913e848
Bump Rust version to 1.69.0
webmaster128 Jun 28, 2023
fca1ff5
Remove muslc example
webmaster128 Jun 28, 2023
416b64e
Clear correct folders in build system
webmaster128 Jun 28, 2023
a1a7b79
Add builders 0016 CHANGELOG
webmaster128 Jun 28, 2023
5b9970c
Set builders tag to 0016
webmaster128 Jun 28, 2023
f1bab34
Merge pull request #438 from CosmWasm/use-wasmvmstatic-example
webmaster128 Jun 28, 2023
daf4280
[skip ci] Built release libraries
Jun 28, 2023
9e5612e
Add CreateChecksum
webmaster128 Mar 27, 2023
188d581
Merge pull request #410 from CosmWasm/add-checksum-hasher
webmaster128 Jun 28, 2023
b00739a
[skip ci] Built release libraries
Jun 28, 2023
b419fd0
Upgrade cosmwasm to release/1.3
webmaster128 Jun 29, 2023
9120694
Add `DistributionQuery::DelegatorWithdrawAddress`
chipshort Jul 3, 2023
724041f
Merge pull request #442 from CosmWasm/distribution-query
webmaster128 Jul 3, 2023
f9f7c66
[skip ci] Built release libraries
Jul 3, 2023
af40a4d
Upgrade cosmwasm to 1.3.0-rc.0 and bump
chipshort Jul 4, 2023
9bac597
Bump ci rust version to 1.65
chipshort Jul 4, 2023
1648946
Update min compiler version in docs
chipshort Jul 4, 2023
f2b2fed
Fix clippy lints
chipshort Jul 4, 2023
3a28663
Fix builder version in docs
chipshort Jul 4, 2023
f874374
Merge pull request #440 from CosmWasm/cosmwasm-1.3
webmaster128 Jul 4, 2023
2c5c404
[skip ci] Built release libraries
Jul 4, 2023
bc050a0
Add checksum test
webmaster128 Jun 29, 2023
e8a2a08
Add StoreCodeUnchecked
webmaster128 Jun 29, 2023
8bcc0ee
add MsgFundCommunityPool to DistributionMsg
fragwuerdig Jun 21, 2023
0d46d91
add serialization test
fragwuerdig Jun 21, 2023
b134364
requested changes
fragwuerdig Jun 22, 2023
43a9b6f
gofumpt
fragwuerdig Jun 22, 2023
0618fb1
Fix DenomMetadata json key
chipshort Jul 5, 2023
60559c9
Merge pull request #441 from CosmWasm/save_wasm_unchecked
webmaster128 Jul 5, 2023
758df22
[skip ci] Built release libraries
Jul 5, 2023
8376c5e
Merge pull request #443 from CosmWasm/add-fund-cp
webmaster128 Jul 5, 2023
965a045
[skip ci] Built release libraries
Jul 5, 2023
b39e91d
Remove pointer
chipshort Jul 5, 2023
94c5bf2
Merge pull request #430 from CosmWasm/chipshort/denom-metadata-query
webmaster128 Jul 5, 2023
2b283aa
[skip ci] Built release libraries
Jul 5, 2023
0d27e49
Add Go linter to GitHub Actions
webmaster128 Jul 15, 2023
4f5bdab
Add make lint
webmaster128 Jul 16, 2023
d0d79cc
Fix some linting in tests
webmaster128 Jul 16, 2023
8d2b576
Fix JSON tag formatting
webmaster128 Jul 16, 2023
39d5884
Merge pull request #444 from CosmWasm/add-go-linter
webmaster128 Jul 16, 2023
ad77604
[skip ci] Built release libraries
Jul 16, 2023
ea7a03a
Update to final 1.3 release
chipshort Jul 17, 2023
f4e5e87
Set libwasmvm version to 1.3.0
chipshort Jul 17, 2023
6733639
Merge pull request #445 from CosmWasm/release-1-3
chipshort Jul 17, 2023
71a9c0d
[skip ci] Built release libraries
Jul 17, 2023
71615ff
Merge pull request #379 from dzmitry-lahoda-forks/patch-1
chipshort Jul 17, 2023
1638725
[skip ci] Built release libraries
Jul 17, 2023
6955557
Document type Querier interface
webmaster128 Aug 16, 2023
dedfdaa
Merge pull request #447 from CosmWasm/document-Querier-interface
webmaster128 Aug 16, 2023
6efb1b9
[skip ci] Built release libraries
Aug 16, 2023
d6b6e48
Return full gas report
chipshort Aug 16, 2023
ea1c5c8
Set libwasmvm version to 1.3.1
chipshort Aug 16, 2023
b267953
Use destructuring for GasReport conversion
chipshort Aug 16, 2023
3e75d65
Adjust go side to new libwasmvm interface
chipshort Aug 17, 2023
f7a93aa
Rename gas_used to gas_report
chipshort Aug 21, 2023
996f97e
Return full GasReport from internal api
chipshort Aug 21, 2023
4ebb1cb
Merge pull request #449 from CosmWasm/gas-report-part1
chipshort Aug 22, 2023
0082196
[skip ci] Built release libraries
Aug 22, 2023
07af8a5
Update min rust version
chipshort Aug 25, 2023
6d67073
Fix clippy lints
chipshort Aug 28, 2023
5b0a875
Merge pull request #452 from CosmWasm/update-rust-ci
chipshort Aug 28, 2023
e054c74
[skip ci] Built release libraries
Aug 28, 2023
94b6319
Update cosmwasm version
chipshort Aug 25, 2023
41d7ced
Implement GoStorage::{next_key, next_value}
chipshort Aug 25, 2023
61bfe19
Remove _db suffix
chipshort Aug 28, 2023
4f4ce1d
Add function name to iterator vtable error message
chipshort Aug 28, 2023
57da21e
Use if-let instead of match
chipshort Aug 28, 2023
7410295
Use let-else
webmaster128 Aug 28, 2023
b7d3f0f
Adjust cache sizes
chipshort Aug 28, 2023
6409d9d
Fix comment
chipshort Aug 28, 2023
c928670
Rename db function type names
chipshort Aug 28, 2023
f84a632
Simplify next_key_or_val signature
chipshort Aug 28, 2023
ac29b8d
Use cosmwasm beta release
chipshort Aug 29, 2023
c34e346
Merge pull request #450 from CosmWasm/1498-key-only-iteration
webmaster128 Aug 30, 2023
2d18fc0
[skip ci] Built release libraries
Aug 30, 2023
1a81e43
Install time dependency
webmaster128 Aug 29, 2023
0dc1dd0
Show time+gas information as part of debug output
webmaster128 Aug 30, 2023
139836c
Merge pull request #453 from CosmWasm/use-different-set_debug_handler
webmaster128 Aug 30, 2023
a70996d
[skip ci] Built release libraries
Aug 30, 2023
50571bb
Add new distribution query types
chipshort Aug 25, 2023
49fbcb2
Merge pull request #455 from CosmWasm/454-delegation-queries
chipshort Aug 30, 2023
4cedc9c
[skip ci] Built release libraries
Aug 30, 2023
793060b
Set libwasmvm version to 1.4.0-rc.1
chipshort Aug 30, 2023
7c2a35d
[skip ci] Built release libraries
Aug 30, 2023
2988d8c
Remove unnecessary recycle calls
chipshort Sep 4, 2023
2e221f0
Bump libwasmvm
chipshort Sep 4, 2023
7b7ece6
Merge pull request #456 from CosmWasm/release-1-4
chipshort Sep 4, 2023
ff4695d
[skip ci] Built release libraries
Sep 4, 2023
b75a7ec
Bump cosmwasm
chipshort Oct 9, 2023
f8b6b84
Retract 1.4.0 release
chipshort Oct 9, 2023
41f7ccd
[skip ci] Built release libraries
Oct 9, 2023
ee2af91
Merge tag 'v1.4.1' into bump/v1.4.1
da1suk8 Dec 13, 2023
6092669
fix: change from Cosmwasm to Finschia
da1suk8 Dec 13, 2023
af3a5c8
build: build libwasmvm
da1suk8 Dec 13, 2023
c7f7fa8
ci: change default rust toolchain from 1.60.0 to 1.67.0
da1suk8 Dec 13, 2023
9bcab16
fix: change from "io/ioutil" to "os"
da1suk8 Dec 13, 2023
867c707
fix: lint error
da1suk8 Dec 13, 2023
7b9505c
fix: remove backslash
da1suk8 Dec 13, 2023
92a2289
fix: change from 1.20 to 1.19.7
da1suk8 Dec 15, 2023
17789e0
docs: update CHANGELOG
da1suk8 Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/builds_and_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
toolchain: 1.67.0
target: wasm32-unknown-unknown
profile: minimal
override: true
Expand All @@ -19,7 +19,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cargo
key: cargocache-v2-libwasmvm_sanity-rust:1.60.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-libwasmvm_sanity-rust:1.67.0-${{ hashFiles('Cargo.lock') }}
- name: Install shellcheck
run: sudo apt install shellcheck
- name: Show version information
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
toolchain: 1.67.0
target: x86_64-unknown-linux-gnu
profile: minimal
override: true
Expand All @@ -143,7 +143,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cargo
key: cargocache-v2-build_shared_library-rust:1.60.0-${{ hashFiles('Cargo.lock') }}
key: cargocache-v2-build_shared_library-rust:1.67.0-${{ hashFiles('Cargo.lock') }}
- name: Show version information
run: rustc --version; cargo --version; rustup --version
- name: Create release build of libwasmvm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_to_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
toolchain: 1.67.0
profile: minimal
override: true
- name: Checkout
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/[email protected]
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.53

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
.vscode

# no static libraries (35MB+)
lib*.a
/internal/api/lib*.a

# artifacts from compile tests
artifacts/
muslc.exe
static.exe
/build/
/demo
tmp
a.out
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [Unreleased](https://github.com/Finschia/wasmvm/compare/v1.1.1-0.11.6...HEAD)

### Features
* bump up wasmvm from v1.1.1 to v1.4.1 ([#136](https://github.com/Finschia/wasmvm/pull/136))

## [[1.1.1-0.11.6](https://github.com/Finschia/wasmvm/compare/v1.1.1+0.11.5...v1.1.1-0.11.6)] - 2023-10-18
### Changes
* revert: use pre-release versioning and set version to 1.1.1-0.11.6 ([#130](https://github.com/Finschia/wasmvm/pull/130))
Expand Down
31 changes: 23 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ build-rust-release:

build-go:
go build ./...
go build -o build/demo ./cmd/demo

test:
# Use package list mode to include all subdirectores. The -count=1 turns off caching.
Expand All @@ -65,7 +66,9 @@ test-safety:

# Creates a release build in a containerized build environment of the static library for Alpine Linux (.a)
release-build-alpine:
rm -rf libwasmvm/target/release
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
rm -rf libwasmvm/target/aarch64-unknown-linux-musl/release
rm -rf libwasmvm/target/x86_64-unknown-linux-musl/release
# build the muslc *.a file
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-alpine
cp libwasmvm/artifacts/libwasmvm_muslc.a internal/api
Expand All @@ -78,14 +81,17 @@ release-build-alpine:

# Creates a release build in a containerized build environment of the shared library for glibc Linux (.so)
release-build-linux:
rm -rf libwasmvm/target/release
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-centos7
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
rm -rf libwasmvm/target/x86_64-unknown-linux-gnu/release
rm -rf libwasmvm/target/aarch64-unknown-linux-gnu/release
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-centos7 build_linux.sh
cp libwasmvm/artifacts/libwasmvm.x86_64.so internal/api
cp libwasmvm/artifacts/libwasmvm.aarch64.so internal/api
make update-bindings

# Creates a release build in a containerized build environment of the shared library for macOS (.dylib)
release-build-macos:
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
rm -rf libwasmvm/target/x86_64-apple-darwin/release
rm -rf libwasmvm/target/aarch64-apple-darwin/release
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-cross build_macos.sh
Expand All @@ -94,18 +100,17 @@ release-build-macos:

# Creates a release build in a containerized build environment of the static library for macOS (.a)
release-build-macos-static:
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
rm -rf libwasmvm/target/x86_64-apple-darwin/release
rm -rf libwasmvm/target/aarch64-apple-darwin/release
docker run --rm -u $(USER_ID):$(USER_GROUP) \
-v $(shell pwd)/libwasmvm:/code \
-v $(shell pwd)/builders/guest/build_macos_static.sh:/usr/local/bin/build_macos_static.sh \
$(BUILDERS_PREFIX)-cross build_macos_static.sh
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-cross build_macos_static.sh
cp libwasmvm/artifacts/libwasmvmstatic_darwin.a internal/api/libwasmvmstatic_darwin.a
make update-bindings

# Creates a release build in a containerized build environment of the shared library for Windows (.dll)
release-build-windows:
rm -rf libwasmvm/target/release
# Builders should not write their target folder into the host file system (https://github.com/CosmWasm/wasmvm/issues/437)
rm -rf libwasmvm/target/x86_64-pc-windows-gnu/release
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX)-cross build_windows.sh
cp libwasmvm/target/x86_64-pc-windows-gnu/release/wasmvm.dll internal/api
make update-bindings
Expand Down Expand Up @@ -144,3 +149,13 @@ test-alpine: release-build-alpine

@# Run binary locally if you are on Linux
@# ./demo ./testdata/hackatom.wasm

.PHONY: format
format:
find . -name '*.go' -type f | xargs gofumpt -w -s
find . -name '*.go' -type f | xargs misspell -w
find . -name '*.go' -type f | xargs goimports -w -local github.com/CosmWasm/wasmvm

.PHONY: lint
lint:
golangci-lint run
4 changes: 2 additions & 2 deletions builders/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 1. Build the static Rust library
# 2. Execute Go tests that use and test this library
# For 2. we define the Go image here. For 1. we install Rust below.
FROM golang:1.20-alpine
FROM golang:1.19.7-alpine

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
Expand All @@ -16,7 +16,7 @@ RUN set -eux \

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-musl/rustup-init" \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.63.0 \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.69.0 \
&& rm rustup-init \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME

Expand Down
18 changes: 7 additions & 11 deletions builders/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,21 @@ ENV RUSTUP_HOME=/usr/local/rustup \

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.60.0 \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.69.0 \
&& rm rustup-init \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
&& rustup --version \
&& cargo --version \
&& rustc --version

# Add aarch64 as a target of compilation
RUN rustup target add aarch64-unknown-linux-gnu

# allow non-root user to download more deps later
RUN chmod -R 777 /usr/local/cargo
&& rustc --version \
&& chmod -R 777 /usr/local/cargo \
&& rustup target add aarch64-unknown-linux-gnu

## COPY BUILD SCRIPTS

WORKDIR /code

COPY guest/*.sh /opt/
RUN chmod +x /opt/*.sh
COPY guest/*.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/*.sh

RUN mkdir /.cargo
RUN chmod +rx /.cargo
Expand All @@ -57,4 +53,4 @@ RUN wget http://mirror.centos.org/altarch/7/os/aarch64/Packages/libgcc-4.8.5-44.
&& cp /code/lib64/libgcc_s-4.8.5-20150702.so.1 /usr/lib/gcc/aarch64-linux-gnu/4.8.5/libgcc_s.so \
&& rm libgcc-*.el7.aarch64.rpm

CMD ["/opt/build_linux.sh"]
CMD ["bash", "-c", "echo 'Argument missing. Pass one build script (e.g. build_linux.sh) to docker run' && exit 1"]
2 changes: 1 addition & 1 deletion builders/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.63.0-bullseye
FROM rust:1.69.0-bullseye

# Install build dependencies
RUN apt-get update \
Expand Down
18 changes: 9 additions & 9 deletions builders/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Cross Compilation Scripts

As this library is targetting go developers, we cannot assume a properly set up
rust environment on their system. Further, when importing this library, there is no
clean way to add a `libwasmvm.{so,dll,dylib}`. It needs to be committed with the
tagged (go) release in order to be easily usable.
rust environment on their system. Further, when importing this library, there is
no clean way to add a `libwasmvm.{so,dll,dylib}`. It needs to be committed with
the tagged (go) release in order to be easily usable.

The solution is to precompile the rust code into libraries for the major platforms
(Linux, Windows, MacOS) and commit them to the repository at each tagged release.
This should be doable from one host machine, but is a bit tricky. This folder
contains build scripts and a Docker image to create all dynamic libraries from one
host. In general this is set up for a Linux host, but any machine that can run Docker
can do the cross-compilation.
The solution is to precompile the rust code into libraries for the major
platforms (Linux, Windows, MacOS) and commit them to the repository at each
tagged release. This should be doable from one host machine, but is a bit
tricky. This folder contains build scripts and a Docker image to create all
dynamic libraries from one host. In general this is set up for a Linux host, but
any machine that can run Docker can do the cross-compilation.

For more information visit [here](https://github.com/CosmWasm/wasmvm/tree/main/builders#readme).
19 changes: 19 additions & 0 deletions builders/guest/build_gnu_aarch64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# See https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-880616953 for two approaches to
# enable stripping through cargo (if that is desired).

echo "Starting aarch64-unknown-linux-gnu build"
export CC=clang
export CXX=clang++
export qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu"
export CC_aarch64_unknown_linux_gnu=clang
export AR_aarch64_unknown_linux_gnu=llvm-ar
export CFLAGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu"
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="$qemu_aarch64"
cargo build --release --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/libwasmvm.so artifacts/libwasmvm.aarch64.so
13 changes: 13 additions & 0 deletions builders/guest/build_gnu_x86_64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# See https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-880616953 for two approaches to
# enable stripping through cargo (if that is desired).

echo "Starting x86_64-unknown-linux-gnu build"
export CC=clang
export CXX=clang++
cargo build --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/libwasmvm.so artifacts/libwasmvm.x86_64.so
20 changes: 2 additions & 18 deletions builders/guest/build_linux.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail

# See https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-880616953 for two approaches to
# enable stripping through cargo (if that is desired).

echo "Starting x86_64-unknown-linux-gnu build"
export CC=clang
export CXX=clang++
cargo build --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/libwasmvm.so artifacts/libwasmvm.x86_64.so

echo "Starting aarch64-unknown-linux-gnu build"
export qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu"
export CC_aarch64_unknown_linux_gnu=clang
export AR_aarch64_unknown_linux_gnu=llvm-ar
export CFLAGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu"
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="$qemu_aarch64"
cargo build --release --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/libwasmvm.so artifacts/libwasmvm.aarch64.so
build_gnu_x86_64.sh
build_gnu_aarch64.sh
2 changes: 2 additions & 0 deletions builders/guest/build_macos.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# ref: https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html
export PATH="/opt/osxcross/target/bin:$PATH"
export LIBZ_SYS_STATIC=1
Expand Down
2 changes: 2 additions & 0 deletions builders/guest/build_macos_static.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# ref: https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html
export PATH="/opt/osxcross/target/bin:$PATH"
export LIBZ_SYS_STATIC=1
Expand Down
10 changes: 6 additions & 4 deletions builders/guest/build_muslc.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/sh
set -e # Note we are not using bash here but the Alpine default shell

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# See https://github.com/CosmWasm/wasmvm/issues/222#issuecomment-880616953 for two approaches to
# enable stripping through cargo (if that is desired).

echo "Starting aarch64-unknown-linux-musl build"
export CC=/opt/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
cargo build --release --target aarch64-unknown-linux-musl --example muslc
cargo build --release --target aarch64-unknown-linux-musl --example wasmvmstatic
unset CC

echo "Starting x86_64-unknown-linux-musl build"
cargo build --release --target x86_64-unknown-linux-musl --example muslc
cargo build --release --target x86_64-unknown-linux-musl --example wasmvmstatic

cp target/aarch64-unknown-linux-musl/release/examples/libmuslc.a artifacts/libwasmvm_muslc.aarch64.a
cp target/x86_64-unknown-linux-musl/release/examples/libmuslc.a artifacts/libwasmvm_muslc.a
cp target/aarch64-unknown-linux-musl/release/examples/libwasmvmstatic.a artifacts/libwasmvm_muslc.aarch64.a
cp target/x86_64-unknown-linux-musl/release/examples/libwasmvmstatic.a artifacts/libwasmvm_muslc.a
Loading
Loading