diff --git a/.github/actions/binary-compatible-builds/action.yml b/.github/actions/binary-compatible-builds/action.yml index c2950d99b02b..b5a190c4a06f 100644 --- a/.github/actions/binary-compatible-builds/action.yml +++ b/.github/actions/binary-compatible-builds/action.yml @@ -2,7 +2,7 @@ name: 'Set up a CentOS 6 container to build releases in' description: 'Set up a CentOS 6 container to build releases in' runs: - using: node12 + using: node16 main: 'main.js' inputs: name: diff --git a/.github/actions/github-release/action.yml b/.github/actions/github-release/action.yml index 3225a91dbbe2..17c4715b9c12 100644 --- a/.github/actions/github-release/action.yml +++ b/.github/actions/github-release/action.yml @@ -8,5 +8,5 @@ inputs: description: '' required: true runs: - using: 'node12' + using: 'node16' main: 'main.js' diff --git a/.github/actions/github-release/main.js b/.github/actions/github-release/main.js index 82374c99484b..c91f7862a1b0 100644 --- a/.github/actions/github-release/main.js +++ b/.github/actions/github-release/main.js @@ -25,7 +25,7 @@ async function runOnce() { core.info(`name: ${name}`); core.info(`token: ${token}`); - const octokit = new github.GitHub(token); + const octokit = github.getOctokit(token); // For the `dev` release we may need to update the tag to point to the new // commit on this branch. All other names should already have tags associated @@ -43,20 +43,10 @@ async function runOnce() { if (tag === null || tag.data.object.sha !== sha) { core.info(`updating existing tag or creating new one`); - // Delete the previous release for this tag, if any - try { - core.info(`fetching release for ${name}`); - const release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name }); - core.info(`deleting release ${release.data.id}`); - await octokit.repos.deleteRelease({ owner, repo, release_id: release.data.id }); - } catch (e) { - // ignore, there may not have been a release - console.log("ERROR: ", JSON.stringify(e, null, 2)); - } try { core.info(`updating dev tag`); - await octokit.git.updateRef({ + await octokit.rest.git.updateRef({ owner, repo, ref: 'tags/dev', @@ -80,6 +70,13 @@ async function runOnce() { // tag by this point. } } + + console.log("double-checking tag is correct"); + tag = await octokit.request("GET /repos/:owner/:repo/git/refs/tags/:name", { owner, repo, name }); + if (tag.data.object.sha !== sha) { + console.log("tag: ", JSON.stringify(tag.data, null, 2)); + throw new Error("tag didn't work"); + } } else { core.info(`existing tag works`); } @@ -91,12 +88,12 @@ async function runOnce() { let release = null; try { core.info(`fetching release`); - release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name }); + release = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag: name }); } catch (e) { console.log("ERROR: ", JSON.stringify(e, null, 2)); core.info(`creating a release`); try { - release = await octokit.repos.createRelease({ + release = await octokit.rest.repos.createRelease({ owner, repo, tag_name: name, @@ -105,7 +102,7 @@ async function runOnce() { } catch(e) { console.log("ERROR: ", JSON.stringify(e, null, 2)); core.info(`fetching one more time`); - release = await octokit.repos.getReleaseByTag({ owner, repo, tag: name }); + release = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag: name }); } } console.log("found release: ", JSON.stringify(release.data, null, 2)); @@ -113,11 +110,22 @@ async function runOnce() { // Upload all the relevant assets for this release as just general blobs. for (const file of glob.sync(files)) { const size = fs.statSync(file).size; + const name = path.basename(file); + for (const asset of release.data.assets) { + if (asset.name !== name) + continue; + console.log(`deleting prior asset ${asset.id}`); + await octokit.rest.repos.deleteReleaseAsset({ + owner, + repo, + asset_id: asset.id, + }); + } core.info(`upload ${file}`); - await octokit.repos.uploadReleaseAsset({ + await octokit.rest.repos.uploadReleaseAsset({ data: fs.createReadStream(file), headers: { 'content-length': size, 'content-type': 'application/octet-stream' }, - name: path.basename(file), + name, url: release.data.upload_url, }); } diff --git a/.github/actions/github-release/package-lock.json b/.github/actions/github-release/package-lock.json new file mode 100644 index 000000000000..0bfb4329948d --- /dev/null +++ b/.github/actions/github-release/package-lock.json @@ -0,0 +1,571 @@ +{ + "name": "wasmtime-github-release", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "wasmtime-github-release", + "version": "0.0.0", + "dependencies": { + "@actions/core": "^1.9.1", + "@actions/github": "^5.1.0", + "glob": "^7.1.5" + } + }, + "node_modules/@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/github": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.0.tgz", + "integrity": "sha512-tuI80F7JQIhg77ZTTgUAPpVD7ZnP9oHSPN8xw7LOwtA4vEMbAjWJNbmLBfV7xua7r016GyjzWLuec5cs8f/a8A==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + }, + "dependencies": { + "@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "@actions/github": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.0.tgz", + "integrity": "sha512-tuI80F7JQIhg77ZTTgUAPpVD7ZnP9oHSPN8xw7LOwtA4vEMbAjWJNbmLBfV7xua7r016GyjzWLuec5cs8f/a8A==", + "requires": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + } + }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + }, + "@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "requires": { + "@octokit/types": "^6.0.3" + } + }, + "@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "requires": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "requires": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "requires": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "requires": { + "@octokit/types": "^6.40.0" + } + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "requires": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "requires": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "requires": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/.github/actions/github-release/package.json b/.github/actions/github-release/package.json index abfc55f6ff2b..80ab88253ad6 100644 --- a/.github/actions/github-release/package.json +++ b/.github/actions/github-release/package.json @@ -3,8 +3,8 @@ "version": "0.0.0", "main": "main.js", "dependencies": { - "@actions/core": "^1.0.0", - "@actions/github": "^1.0.0", + "@actions/core": "^1.9.1", + "@actions/github": "^5.1.0", "glob": "^7.1.5" } } diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.yml index 7a196591840d..6afc01d6f234 100644 --- a/.github/actions/install-rust/action.yml +++ b/.github/actions/install-rust/action.yml @@ -8,5 +8,5 @@ inputs: default: 'stable' runs: - using: node12 + using: node16 main: 'main.js' diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml index 4c24d366c84a..951fe2ca6780 100644 --- a/.github/workflows/cargo-audit.yml +++ b/.github/workflows/cargo-audit.yml @@ -6,7 +6,7 @@ jobs: security_audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: actions-rs/audit-check@v1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 438d688d0dcd..9f616f6df417 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust @@ -34,7 +34,7 @@ jobs: name: Cargo deny runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust @@ -52,11 +52,11 @@ jobs: env: CARGO_VET_VERSION: 0.3.0 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ runner.tool_cache }}/cargo-vet key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} @@ -68,11 +68,11 @@ jobs: name: Doc build runs-on: ubuntu-latest env: - CARGO_MDBOOK_VERSION: 0.4.8 + CARGO_MDBOOK_VERSION: 0.4.21 RUSTDOCFLAGS: -Dbroken_intra_doc_links --cfg nightlydoc OPENVINO_SKIP_LINKING: 1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust @@ -81,12 +81,12 @@ jobs: # Build C API documentation - run: sudo apt-get update -y && sudo apt-get install -y libclang1-9 libclang-cpp9 - - run: curl -L https://www.doxygen.nl/files/doxygen-1.9.3.linux.bin.tar.gz | tar xzf - + - run: curl -L https://sourceforge.net/projects/doxygen/files/rel-1.9.3/doxygen-1.9.3.linux.bin.tar.gz/download | tar xzf - - run: echo "`pwd`/doxygen-1.9.3/bin" >> $GITHUB_PATH - run: cd crates/c-api && doxygen doxygen.conf # install mdbook, build the docs, and test the docs - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ runner.tool_cache }}/mdbook key: cargo-mdbook-bin-${{ env.CARGO_MDBOOK_VERSION }} @@ -113,7 +113,7 @@ jobs: mv crates/c-api/html gh-pages/c-api mv target/doc gh-pages/api tar czf gh-pages.tar.gz gh-pages - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: gh-pages path: gh-pages.tar.gz @@ -137,7 +137,7 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust @@ -187,7 +187,7 @@ jobs: name: Fuzz Targets runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true # Note that building with fuzzers requires nightly since it uses unstable @@ -234,7 +234,7 @@ jobs: qemu: qemu-s390x -L /usr/s390x-linux-gnu qemu_target: s390x-linux-user steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-rust @@ -251,7 +251,7 @@ jobs: - run: cargo fetch --locked - run: cargo fetch --locked --manifest-path crates/test-programs/wasi-tests/Cargo.toml - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ runner.tool_cache }}/qemu key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patchmadvise2 @@ -342,7 +342,7 @@ jobs: name: Test wasi-crypto module runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: rustup target add wasm32-wasi @@ -356,7 +356,7 @@ jobs: name: Run benchmarks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: rustup target add wasm32-wasi @@ -369,7 +369,7 @@ jobs: name: Meta deterministic check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - name: Install Rust @@ -405,7 +405,7 @@ jobs: os: ubuntu-latest target: s390x-unknown-linux-gnu steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true # On one builder produce the source tarball since there's no need to produce @@ -430,7 +430,7 @@ jobs: # Assemble release artifats appropriate for this platform, then upload them # unconditionally to this workflow's files so we have a copy of them. - run: ./ci/build-tarballs.sh "${{ matrix.build }}" "${{ matrix.target }}" - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v3 with: name: bins-${{ matrix.build }} path: dist @@ -452,7 +452,7 @@ jobs: if: github.repository == 'bytecodealliance/wasmtime' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: rustup update stable && rustup default stable diff --git a/.github/workflows/publish-to-cratesio.yml b/.github/workflows/publish-to-cratesio.yml index 7fe1991f4e34..6d05b66778a4 100644 --- a/.github/workflows/publish-to-cratesio.yml +++ b/.github/workflows/publish-to-cratesio.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'bytecodealliance/wasmtime' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: rustup update stable && rustup default stable diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index 97c67608fbd7..13208f381b6f 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -17,23 +17,23 @@ jobs: if: github.repository == 'bytecodealliance/wasmtime' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - name: Test if tag is needed run: | git log ${{ github.event.before }}...${{ github.event.after }} | tee main.log - version=$(grep 'version =' Cargo.toml | head -n 1 | sed 's/.*"\(.*\)"/\1/') + version=$(grep '^version =' Cargo.toml | head -n 1 | sed 's/.*"\(.*\)"/\1/') echo "version: $version" - echo "::set-output name=version::$version" - echo "::set-output name=sha::$(git rev-parse HEAD)" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT if grep -q "automatically-tag-and-release-this-commit" main.log; then echo push-tag - echo "::set-output name=push_tag::yes" + echo "push_tag=yes" >> $GITHUB_OUTPUT else echo no-push-tag - echo "::set-output name=push_tag::no" + echo "push_tag=no" >> $GITHUB_OUTPUT fi id: tag - name: Push the tag diff --git a/.github/workflows/release-process.yml b/.github/workflows/release-process.yml index 7caeeb8b5e20..c569be0bd854 100644 --- a/.github/workflows/release-process.yml +++ b/.github/workflows/release-process.yml @@ -38,7 +38,7 @@ jobs: name: Run the release process runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - name: Setup diff --git a/Cargo.lock b/Cargo.lock index 80e19d4527a0..00adbc7b5e4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -509,7 +509,7 @@ dependencies = [ [[package]] name = "cranelift" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "cranelift-frontend", @@ -517,14 +517,14 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.1" +version = "0.88.2" dependencies = [ "arrayvec", "bincode", @@ -549,18 +549,18 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.1" +version = "0.88.2" [[package]] name = "cranelift-entity" -version = "0.88.1" +version = "0.88.2" dependencies = [ "serde", ] @@ -590,7 +590,7 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "hashbrown", @@ -611,7 +611,7 @@ dependencies = [ [[package]] name = "cranelift-interpreter" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -625,7 +625,7 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.1" +version = "0.88.2" dependencies = [ "log", "miette", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "cranelift-jit" -version = "0.88.1" +version = "0.88.2" dependencies = [ "anyhow", "cranelift", @@ -653,7 +653,7 @@ dependencies = [ [[package]] name = "cranelift-module" -version = "0.88.1" +version = "0.88.2" dependencies = [ "anyhow", "cranelift-codegen", @@ -662,7 +662,7 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "libc", @@ -671,7 +671,7 @@ dependencies = [ [[package]] name = "cranelift-object" -version = "0.88.1" +version = "0.88.2" dependencies = [ "anyhow", "cranelift-codegen", @@ -685,14 +685,14 @@ dependencies = [ [[package]] name = "cranelift-preopt" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", ] [[package]] name = "cranelift-reader" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "smallvec", @@ -701,7 +701,7 @@ dependencies = [ [[package]] name = "cranelift-serde" -version = "0.88.1" +version = "0.88.2" dependencies = [ "clap 3.2.8", "cranelift-codegen", @@ -744,7 +744,7 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.1" +version = "0.88.2" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -3098,7 +3098,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-cap-std-sync" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "async-trait", @@ -3121,7 +3121,7 @@ dependencies = [ [[package]] name = "wasi-common" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "bitflags", @@ -3166,7 +3166,7 @@ dependencies = [ [[package]] name = "wasi-tokio" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "cap-std", @@ -3326,7 +3326,7 @@ dependencies = [ [[package]] name = "wasmtime" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "async-trait", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "1.0.1" +version = "1.0.2" dependencies = [ "cfg-if", ] @@ -3408,7 +3408,7 @@ dependencies = [ [[package]] name = "wasmtime-cache" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "base64", @@ -3430,7 +3430,7 @@ dependencies = [ [[package]] name = "wasmtime-cli" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "async-trait", @@ -3471,7 +3471,7 @@ dependencies = [ [[package]] name = "wasmtime-cli-flags" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "clap 3.2.8", @@ -3483,7 +3483,7 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "1.0.1" +version = "1.0.2" dependencies = [ "proc-macro2", "quote", @@ -3493,11 +3493,11 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "1.0.1" +version = "1.0.2" [[package]] name = "wasmtime-cranelift" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "cranelift-codegen", @@ -3516,7 +3516,7 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "atty", @@ -3554,7 +3554,7 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "1.0.1" +version = "1.0.2" dependencies = [ "backtrace", "cc", @@ -3617,7 +3617,7 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.1" +version = "1.0.2" dependencies = [ "addr2line", "anyhow", @@ -3641,7 +3641,7 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "1.0.1" +version = "1.0.2" dependencies = [ "object", "once_cell", @@ -3650,7 +3650,7 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "cc", @@ -3675,7 +3675,7 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "1.0.1" +version = "1.0.2" dependencies = [ "cranelift-entity", "serde", @@ -3685,7 +3685,7 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "wasi-cap-std-sync", @@ -3697,7 +3697,7 @@ dependencies = [ [[package]] name = "wasmtime-wasi-crypto" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "wasi-crypto", @@ -3707,7 +3707,7 @@ dependencies = [ [[package]] name = "wasmtime-wasi-nn" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "openvino", @@ -3718,7 +3718,7 @@ dependencies = [ [[package]] name = "wasmtime-wast" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "log", @@ -3779,7 +3779,7 @@ dependencies = [ [[package]] name = "wiggle" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "async-trait", @@ -3796,7 +3796,7 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "heck", @@ -3809,7 +3809,7 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "1.0.1" +version = "1.0.2" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index aaecc2628582..5316f2c98fad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-cli" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Command-line interface for Wasmtime" license = "Apache-2.0 WITH LLVM-exception" @@ -21,15 +21,15 @@ path = "src/bin/wasmtime.rs" doc = false [dependencies] -wasmtime = { path = "crates/wasmtime", version = "1.0.1", default-features = false, features = ['cache', 'cranelift'] } -wasmtime-cache = { path = "crates/cache", version = "=1.0.1" } -wasmtime-cli-flags = { path = "crates/cli-flags", version = "=1.0.1" } -wasmtime-cranelift = { path = "crates/cranelift", version = "=1.0.1" } -wasmtime-environ = { path = "crates/environ", version = "=1.0.1" } -wasmtime-wast = { path = "crates/wast", version = "=1.0.1" } -wasmtime-wasi = { path = "crates/wasi", version = "1.0.1" } -wasmtime-wasi-crypto = { path = "crates/wasi-crypto", version = "1.0.1", optional = true } -wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "1.0.1", optional = true } +wasmtime = { path = "crates/wasmtime", version = "1.0.2", default-features = false, features = ['cache', 'cranelift'] } +wasmtime-cache = { path = "crates/cache", version = "=1.0.2" } +wasmtime-cli-flags = { path = "crates/cli-flags", version = "=1.0.2" } +wasmtime-cranelift = { path = "crates/cranelift", version = "=1.0.2" } +wasmtime-environ = { path = "crates/environ", version = "=1.0.2" } +wasmtime-wast = { path = "crates/wast", version = "=1.0.2" } +wasmtime-wasi = { path = "crates/wasi", version = "1.0.2" } +wasmtime-wasi-crypto = { path = "crates/wasi-crypto", version = "1.0.2", optional = true } +wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "1.0.2", optional = true } clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] } anyhow = "1.0.19" target-lexicon = { version = "0.12.0", default-features = false } @@ -43,7 +43,7 @@ rustix = { version = "0.35.6", features = ["mm", "param"] } [dev-dependencies] # depend again on wasmtime to activate its default features for tests -wasmtime = { path = "crates/wasmtime", version = "1.0.1", features = ['component-model'] } +wasmtime = { path = "crates/wasmtime", version = "1.0.2", features = ['component-model'] } env_logger = "0.9.0" log = "0.4.8" filecheck = "0.5.0" @@ -60,7 +60,7 @@ wat = "1.0.48" once_cell = "1.9.0" rayon = "1.5.0" component-macro-test = { path = "crates/misc/component-macro-test" } -wasmtime-wast = { path = "crates/wast", version = "=1.0.1", features = ['component-model'] } +wasmtime-wast = { path = "crates/wast", version = "=1.0.2", features = ['component-model'] } component-test-util = { path = "crates/misc/component-test-util" } wasmtime-component-util = { path = "crates/component-util" } diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 6347ce012f80..780a26fb1bee 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -20,19 +20,19 @@ harness = false [dependencies] cfg-if = "1.0" -cranelift-codegen = { path = "codegen", version = "0.88.1" } -cranelift-entity = { path = "entity", version = "0.88.1" } -cranelift-interpreter = { path = "interpreter", version = "0.88.1" } -cranelift-reader = { path = "reader", version = "0.88.1" } -cranelift-frontend = { path = "frontend", version = "0.88.1" } -cranelift-wasm = { path = "wasm", version = "0.88.1", optional = true } -cranelift-native = { path = "native", version = "0.88.1" } +cranelift-codegen = { path = "codegen", version = "0.88.2" } +cranelift-entity = { path = "entity", version = "0.88.2" } +cranelift-interpreter = { path = "interpreter", version = "0.88.2" } +cranelift-reader = { path = "reader", version = "0.88.2" } +cranelift-frontend = { path = "frontend", version = "0.88.2" } +cranelift-wasm = { path = "wasm", version = "0.88.2", optional = true } +cranelift-native = { path = "native", version = "0.88.2" } cranelift-filetests = { path = "filetests", version = "0.73.0" } -cranelift-module = { path = "module", version = "0.88.1" } -cranelift-object = { path = "object", version = "0.88.1" } -cranelift-jit = { path = "jit", version = "0.88.1" } -cranelift-preopt = { path = "preopt", version = "0.88.1" } -cranelift = { path = "umbrella", version = "0.88.1" } +cranelift-module = { path = "module", version = "0.88.2" } +cranelift-object = { path = "object", version = "0.88.2" } +cranelift-jit = { path = "jit", version = "0.88.2" } +cranelift-preopt = { path = "preopt", version = "0.88.2" } +cranelift = { path = "umbrella", version = "0.88.2" } filecheck = "0.5.0" log = "0.4.8" termcolor = "1.1.2" diff --git a/cranelift/bforest/Cargo.toml b/cranelift/bforest/Cargo.toml index 8288abf159d5..e1b82727bcfb 100644 --- a/cranelift/bforest/Cargo.toml +++ b/cranelift/bforest/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-bforest" -version = "0.88.1" +version = "0.88.2" description = "A forest of B+-trees" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-bforest" @@ -12,7 +12,7 @@ keywords = ["btree", "forest", "set", "map"] edition = "2021" [dependencies] -cranelift-entity = { path = "../entity", version = "0.88.1", default-features = false } +cranelift-entity = { path = "../entity", version = "0.88.2", default-features = false } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index 991e0da30feb..2f4573ed0828 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-codegen" -version = "0.88.1" +version = "0.88.2" description = "Low-level code generator library" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-codegen" @@ -15,9 +15,9 @@ edition = "2021" [dependencies] arrayvec = "0.7" bumpalo = "3" -cranelift-codegen-shared = { path = "./shared", version = "0.88.1" } -cranelift-entity = { path = "../entity", version = "0.88.1" } -cranelift-bforest = { path = "../bforest", version = "0.88.1" } +cranelift-codegen-shared = { path = "./shared", version = "0.88.2" } +cranelift-entity = { path = "../entity", version = "0.88.2" } +cranelift-bforest = { path = "../bforest", version = "0.88.2" } hashbrown = { version = "0.12", optional = true } target-lexicon = "0.12" log = { version = "0.4.6", default-features = false } @@ -37,8 +37,8 @@ sha2 = { version = "0.9.0", optional = true } criterion = "0.3" [build-dependencies] -cranelift-codegen-meta = { path = "meta", version = "0.88.1" } -cranelift-isle = { path = "../isle/isle", version = "=0.88.1" } +cranelift-codegen-meta = { path = "meta", version = "0.88.2" } +cranelift-isle = { path = "../isle/isle", version = "=0.88.2" } miette = { version = "5.1.0", features = ["fancy"], optional = true } [features] diff --git a/cranelift/codegen/meta/Cargo.toml b/cranelift/codegen/meta/Cargo.toml index 14357caac695..e1fd735f93bf 100644 --- a/cranelift/codegen/meta/Cargo.toml +++ b/cranelift/codegen/meta/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cranelift-codegen-meta" authors = ["The Cranelift Project Developers"] -version = "0.88.1" +version = "0.88.2" description = "Metaprogram for cranelift-codegen code generator library" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" @@ -13,7 +13,7 @@ edition = "2021" # rustdoc-args = [ "--document-private-items" ] [dependencies] -cranelift-codegen-shared = { path = "../shared", version = "0.88.1" } +cranelift-codegen-shared = { path = "../shared", version = "0.88.2" } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/codegen/shared/Cargo.toml b/cranelift/codegen/shared/Cargo.toml index 6c8f611e35d4..8bec1e0ac1d8 100644 --- a/cranelift/codegen/shared/Cargo.toml +++ b/cranelift/codegen/shared/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-codegen-shared" -version = "0.88.1" +version = "0.88.2" description = "For code shared between cranelift-codegen-meta and cranelift-codegen" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs index 5aa6a5b731f3..d0342bbc2b94 100644 --- a/cranelift/codegen/src/isa/x64/inst/mod.rs +++ b/cranelift/codegen/src/isa/x64/inst/mod.rs @@ -48,7 +48,7 @@ pub struct CallInfo { fn inst_size_test() { // This test will help with unintentionally growing the size // of the Inst enum. - assert_eq!(48, std::mem::size_of::()); + assert_eq!(40, std::mem::size_of::()); } pub(crate) fn low32_will_sign_extend_to_64(x: u64) -> bool { diff --git a/cranelift/entity/Cargo.toml b/cranelift/entity/Cargo.toml index 8e5e20de537d..c4b2a36c85ad 100644 --- a/cranelift/entity/Cargo.toml +++ b/cranelift/entity/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-entity" -version = "0.88.1" +version = "0.88.2" description = "Data structures using entity references as mapping keys" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-entity" diff --git a/cranelift/filetests/Cargo.toml b/cranelift/filetests/Cargo.toml index 05630507ea2f..4ecf4a964ca5 100644 --- a/cranelift/filetests/Cargo.toml +++ b/cranelift/filetests/Cargo.toml @@ -10,14 +10,14 @@ publish = false edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", features = ["testing_hooks"] } -cranelift-frontend = { path = "../frontend", version = "0.88.1" } -cranelift-interpreter = { path = "../interpreter", version = "0.88.1" } -cranelift-native = { path = "../native", version = "0.88.1" } -cranelift-reader = { path = "../reader", version = "0.88.1" } -cranelift-preopt = { path = "../preopt", version = "0.88.1" } -cranelift-jit = { path = "../jit", version = "0.88.1" } -cranelift-module = { path = "../module", version = "0.88.1" } +cranelift-codegen = { path = "../codegen", version = "0.88.2", features = ["testing_hooks"] } +cranelift-frontend = { path = "../frontend", version = "0.88.2" } +cranelift-interpreter = { path = "../interpreter", version = "0.88.2" } +cranelift-native = { path = "../native", version = "0.88.2" } +cranelift-reader = { path = "../reader", version = "0.88.2" } +cranelift-preopt = { path = "../preopt", version = "0.88.2" } +cranelift-jit = { path = "../jit", version = "0.88.2" } +cranelift-module = { path = "../module", version = "0.88.2" } file-per-thread-logger = "0.1.2" filecheck = "0.5.0" gimli = { version = "0.26.0", default-features = false, features = ["read"] } diff --git a/cranelift/frontend/Cargo.toml b/cranelift/frontend/Cargo.toml index f1126507d801..712223819a24 100644 --- a/cranelift/frontend/Cargo.toml +++ b/cranelift/frontend/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-frontend" -version = "0.88.1" +version = "0.88.2" description = "Cranelift IR builder helper" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-frontend" @@ -11,7 +11,7 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } target-lexicon = "0.12" log = { version = "0.4.6", default-features = false } hashbrown = { version = "0.12", optional = true } diff --git a/cranelift/fuzzgen/Cargo.toml b/cranelift/fuzzgen/Cargo.toml index 9f91e7a84a12..e682d87d357d 100644 --- a/cranelift/fuzzgen/Cargo.toml +++ b/cranelift/fuzzgen/Cargo.toml @@ -11,8 +11,8 @@ publish = false [dependencies] -cranelift = { path = "../umbrella", version = "0.88.1" } -cranelift-native = { path = "../native", version = "0.88.1" } +cranelift = { path = "../umbrella", version = "0.88.2" } +cranelift-native = { path = "../native", version = "0.88.2" } anyhow = "1.0.19" arbitrary = "1.0.0" diff --git a/cranelift/interpreter/Cargo.toml b/cranelift/interpreter/Cargo.toml index 936f2112e95a..927f736d83c0 100644 --- a/cranelift/interpreter/Cargo.toml +++ b/cranelift/interpreter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-interpreter" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Interpret Cranelift IR" repository = "https://github.com/bytecodealliance/wasmtime" @@ -11,8 +11,8 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1" } -cranelift-entity = { path = "../entity", version = "0.88.1" } +cranelift-codegen = { path = "../codegen", version = "0.88.2" } +cranelift-entity = { path = "../entity", version = "0.88.2" } log = { version = "0.4.8", default-features = false } smallvec = "1.6.1" thiserror = "1.0.15" @@ -21,8 +21,8 @@ thiserror = "1.0.15" libm = "0.2.4" [dev-dependencies] -cranelift-frontend = { path = "../frontend", version = "0.88.1" } -cranelift-reader = { path = "../reader", version = "0.88.1" } +cranelift-frontend = { path = "../frontend", version = "0.88.2" } +cranelift-reader = { path = "../reader", version = "0.88.2" } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/isle/isle/Cargo.toml b/cranelift/isle/isle/Cargo.toml index 9fa332268b74..fee9f3ced744 100644 --- a/cranelift/isle/isle/Cargo.toml +++ b/cranelift/isle/isle/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0 WITH LLVM-exception" name = "cranelift-isle" readme = "../README.md" repository = "https://github.com/bytecodealliance/wasmtime/tree/main/cranelift/isle" -version = "0.88.1" +version = "0.88.2" [dependencies] log = { version = "0.4", optional = true } diff --git a/cranelift/jit/Cargo.toml b/cranelift/jit/Cargo.toml index e78788be4d7e..512ac4aaa97e 100644 --- a/cranelift/jit/Cargo.toml +++ b/cranelift/jit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-jit" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "A JIT library backed by Cranelift" repository = "https://github.com/bytecodealliance/wasmtime" @@ -10,10 +10,10 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-module = { path = "../module", version = "0.88.1" } -cranelift-native = { path = "../native", version = "0.88.1" } -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false, features = ["std"] } -cranelift-entity = { path = "../entity", version = "0.88.1" } +cranelift-module = { path = "../module", version = "0.88.2" } +cranelift-native = { path = "../native", version = "0.88.2" } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false, features = ["std"] } +cranelift-entity = { path = "../entity", version = "0.88.2" } anyhow = "1.0" region = "2.2.0" libc = { version = "0.2.42" } @@ -34,9 +34,9 @@ selinux-fix = ['memmap2'] default = [] [dev-dependencies] -cranelift = { path = "../umbrella", version = "0.88.1" } -cranelift-frontend = { path = "../frontend", version = "0.88.1" } -cranelift-entity = { path = "../entity", version = "0.88.1" } +cranelift = { path = "../umbrella", version = "0.88.2" } +cranelift-frontend = { path = "../frontend", version = "0.88.2" } +cranelift-entity = { path = "../entity", version = "0.88.2" } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/module/Cargo.toml b/cranelift/module/Cargo.toml index 9da91a141e25..ff468d8374cb 100644 --- a/cranelift/module/Cargo.toml +++ b/cranelift/module/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-module" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Support for linking functions and data with Cranelift" repository = "https://github.com/bytecodealliance/wasmtime" @@ -11,7 +11,7 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } hashbrown = { version = "0.12", optional = true } anyhow = "1.0" diff --git a/cranelift/native/Cargo.toml b/cranelift/native/Cargo.toml index 7e9a043f7c20..d15696f81182 100644 --- a/cranelift/native/Cargo.toml +++ b/cranelift/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-native" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Support for targeting the host with Cranelift" documentation = "https://docs.rs/cranelift-native" @@ -11,7 +11,7 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } target-lexicon = "0.12" [target.'cfg(target_arch = "s390x")'.dependencies] diff --git a/cranelift/object/Cargo.toml b/cranelift/object/Cargo.toml index cfb98284ee05..df6d04662960 100644 --- a/cranelift/object/Cargo.toml +++ b/cranelift/object/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-object" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Emit Cranelift output to native object files with `object`" repository = "https://github.com/bytecodealliance/wasmtime" @@ -10,16 +10,16 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-module = { path = "../module", version = "0.88.1" } -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false, features = ["std"] } +cranelift-module = { path = "../module", version = "0.88.2" } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false, features = ["std"] } object = { version = "0.29.0", default-features = false, features = ["write"] } target-lexicon = "0.12" anyhow = "1.0" log = { version = "0.4.6", default-features = false } [dev-dependencies] -cranelift-frontend = { path = "../frontend", version = "0.88.1" } -cranelift-entity = { path = "../entity", version = "0.88.1" } +cranelift-frontend = { path = "../frontend", version = "0.88.2" } +cranelift-entity = { path = "../entity", version = "0.88.2" } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/preopt/Cargo.toml b/cranelift/preopt/Cargo.toml index 09f1549e85d7..1dc0f7022656 100644 --- a/cranelift/preopt/Cargo.toml +++ b/cranelift/preopt/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-preopt" -version = "0.88.1" +version = "0.88.2" description = "Support for optimizations in Cranelift" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-preopt" @@ -12,7 +12,7 @@ keywords = ["optimize", "compile", "compiler", "jit"] edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } # This is commented out because it doesn't build on Rust 1.25.0, which # cranelift currently supports. # rustc_apfloat = { version = "0.1.2", default-features = false } diff --git a/cranelift/reader/Cargo.toml b/cranelift/reader/Cargo.toml index d7c0fd49be72..d565dbb7e4df 100644 --- a/cranelift/reader/Cargo.toml +++ b/cranelift/reader/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift-reader" -version = "0.88.1" +version = "0.88.2" description = "Cranelift textual IR reader" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-reader" @@ -10,7 +10,7 @@ readme = "README.md" edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1" } +cranelift-codegen = { path = "../codegen", version = "0.88.2" } smallvec = "1.6.1" target-lexicon = "0.12" diff --git a/cranelift/serde/Cargo.toml b/cranelift/serde/Cargo.toml index b1dfd329eb87..61c709bf3c6c 100644 --- a/cranelift/serde/Cargo.toml +++ b/cranelift/serde/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-serde" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Serializer/Deserializer for Cranelift IR" repository = "https://github.com/bytecodealliance/wasmtime" @@ -16,8 +16,8 @@ path = "src/clif-json.rs" [dependencies] clap = { version = "3.2.0", features = ["derive"] } serde_json = "1.0.26" -cranelift-codegen = { path = "../codegen", version = "0.88.1", features = ["enable-serde"] } -cranelift-reader = { path = "../reader", version = "0.88.1" } +cranelift-codegen = { path = "../codegen", version = "0.88.2", features = ["enable-serde"] } +cranelift-reader = { path = "../reader", version = "0.88.2" } [badges] maintenance = { status = "experimental" } diff --git a/cranelift/umbrella/Cargo.toml b/cranelift/umbrella/Cargo.toml index e973d284521e..9ef32ac68f27 100644 --- a/cranelift/umbrella/Cargo.toml +++ b/cranelift/umbrella/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] name = "cranelift" -version = "0.88.1" +version = "0.88.2" description = "Umbrella for commonly-used cranelift crates" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift" @@ -12,8 +12,8 @@ keywords = ["compile", "compiler", "jit"] edition = "2021" [dependencies] -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } -cranelift-frontend = { path = "../frontend", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } +cranelift-frontend = { path = "../frontend", version = "0.88.2", default-features = false } [features] default = ["std"] diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index a0ae6496840d..7ae910011283 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cranelift-wasm" -version = "0.88.1" +version = "0.88.2" authors = ["The Cranelift Project Developers"] description = "Translator from WebAssembly to Cranelift IR" documentation = "https://docs.rs/cranelift-wasm" @@ -13,10 +13,10 @@ edition = "2021" [dependencies] wasmparser = { version = "0.89.0", default-features = false } -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } -cranelift-entity = { path = "../entity", version = "0.88.1" } -cranelift-frontend = { path = "../frontend", version = "0.88.1", default-features = false } -wasmtime-types = { path = "../../crates/types", version = "1.0.1" } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } +cranelift-entity = { path = "../entity", version = "0.88.2" } +cranelift-frontend = { path = "../frontend", version = "0.88.2", default-features = false } +wasmtime-types = { path = "../../crates/types", version = "1.0.2" } hashbrown = { version = "0.12", optional = true } itertools = "0.10.0" log = { version = "0.4.6", default-features = false } @@ -26,7 +26,7 @@ smallvec = "1.6.1" [dev-dependencies] wat = "1.0.47" target-lexicon = "0.12" -cranelift-codegen = { path = "../codegen", version = "0.88.1", default-features = false } +cranelift-codegen = { path = "../codegen", version = "0.88.2", default-features = false } [features] default = ["std"] diff --git a/crates/asm-macros/Cargo.toml b/crates/asm-macros/Cargo.toml index f2c1921ff705..6a6b6b0f9920 100644 --- a/crates/asm-macros/Cargo.toml +++ b/crates/asm-macros/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0 WITH LLVM-exception" name = "wasmtime-asm-macros" repository = "https://github.com/bytecodealliance/wasmtime" -version = "1.0.1" +version = "1.0.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/c-api/src/trap.rs b/crates/c-api/src/trap.rs index 6f60709fe4e6..88788aefdb4f 100644 --- a/crates/c-api/src/trap.rs +++ b/crates/c-api/src/trap.rs @@ -92,7 +92,7 @@ pub extern "C" fn wasm_trap_trace(raw: &wasm_trap_t, out: &mut wasm_frame_vec_t) } #[no_mangle] -pub extern "C" fn wasmtime_trap_code(raw: &wasm_trap_t, code: &mut i32) -> bool { +pub extern "C" fn wasmtime_trap_code(raw: &wasm_trap_t, code: &mut u8) -> bool { match raw.trap.trap_code() { Some(c) => { *code = match c { diff --git a/crates/cache/Cargo.toml b/crates/cache/Cargo.toml index 36d5457e5e6f..576c8aadc939 100644 --- a/crates/cache/Cargo.toml +++ b/crates/cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-cache" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Support for automatic module caching with Wasmtime" license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/cli-flags/Cargo.toml b/crates/cli-flags/Cargo.toml index 3e66f501b441..f9ff71802f10 100644 --- a/crates/cli-flags/Cargo.toml +++ b/crates/cli-flags/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-cli-flags" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Exposes common CLI flags used for running Wasmtime" license = "Apache-2.0 WITH LLVM-exception" @@ -14,7 +14,7 @@ clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] } file-per-thread-logger = "0.1.1" pretty_env_logger = "0.4.0" rayon = "1.5.0" -wasmtime = { path = "../wasmtime", version = "1.0.1", default-features = false } +wasmtime = { path = "../wasmtime", version = "1.0.2", default-features = false } [features] default = [ diff --git a/crates/component-macro/Cargo.toml b/crates/component-macro/Cargo.toml index ca0b6c7e1ef2..fd002a38b1d4 100644 --- a/crates/component-macro/Cargo.toml +++ b/crates/component-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-component-macro" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Macros for deriving component interface types from Rust types" license = "Apache-2.0 WITH LLVM-exception" @@ -17,7 +17,7 @@ proc-macro = true proc-macro2 = "1.0" quote = "1.0" syn = { version = "1.0", features = ["extra-traits"] } -wasmtime-component-util = { path = "../component-util", version = "=1.0.1" } +wasmtime-component-util = { path = "../component-util", version = "=1.0.2" } [badges] maintenance = { status = "actively-developed" } diff --git a/crates/component-util/Cargo.toml b/crates/component-util/Cargo.toml index efb724dbeb9c..184a05fd24ac 100644 --- a/crates/component-util/Cargo.toml +++ b/crates/component-util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-component-util" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Utility types and functions to support the component model in Wasmtime" license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/cranelift/Cargo.toml b/crates/cranelift/Cargo.toml index 56868912b809..ddf35106af62 100644 --- a/crates/cranelift/Cargo.toml +++ b/crates/cranelift/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-cranelift" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Integration between Cranelift and Wasmtime" license = "Apache-2.0 WITH LLVM-exception" @@ -13,12 +13,12 @@ edition = "2021" [dependencies] anyhow = "1.0" log = "0.4" -wasmtime-environ = { path = "../environ", version = "=1.0.1" } -cranelift-wasm = { path = "../../cranelift/wasm", version = "0.88.1" } -cranelift-codegen = { path = "../../cranelift/codegen", version = "0.88.1" } -cranelift-frontend = { path = "../../cranelift/frontend", version = "0.88.1" } -cranelift-entity = { path = "../../cranelift/entity", version = "0.88.1" } -cranelift-native = { path = "../../cranelift/native", version = "0.88.1" } +wasmtime-environ = { path = "../environ", version = "=1.0.2" } +cranelift-wasm = { path = "../../cranelift/wasm", version = "0.88.2" } +cranelift-codegen = { path = "../../cranelift/codegen", version = "0.88.2" } +cranelift-frontend = { path = "../../cranelift/frontend", version = "0.88.2" } +cranelift-entity = { path = "../../cranelift/entity", version = "0.88.2" } +cranelift-native = { path = "../../cranelift/native", version = "0.88.2" } wasmparser = "0.89.0" target-lexicon = "0.12" gimli = { version = "0.26.0", default-features = false, features = ['read', 'std'] } diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml index db7b739312be..e4f132004dab 100644 --- a/crates/environ/Cargo.toml +++ b/crates/environ/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-environ" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Standalone environment support for WebAsssembly code in Cranelift" license = "Apache-2.0 WITH LLVM-exception" @@ -12,8 +12,8 @@ edition = "2021" [dependencies] anyhow = "1.0" -cranelift-entity = { path = "../../cranelift/entity", version = "0.88.1" } -wasmtime-types = { path = "../types", version = "1.0.1" } +cranelift-entity = { path = "../../cranelift/entity", version = "0.88.2" } +wasmtime-types = { path = "../types", version = "1.0.2" } wasmparser = "0.89.0" indexmap = { version = "1.0.2", features = ["serde-1"] } thiserror = "1.0.4" @@ -24,7 +24,7 @@ object = { version = "0.29.0", default-features = false, features = ['read_core' target-lexicon = "0.12" wasm-encoder = { version = "0.16.0", optional = true } wasmprinter = { version = "0.2.39", optional = true } -wasmtime-component-util = { path = "../component-util", version = "=1.0.1", optional = true } +wasmtime-component-util = { path = "../component-util", version = "=1.0.2", optional = true } [dev-dependencies] atty = "0.2.14" diff --git a/crates/fiber/Cargo.toml b/crates/fiber/Cargo.toml index c42f682ed302..92db6f4f06f3 100644 --- a/crates/fiber/Cargo.toml +++ b/crates/fiber/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-fiber" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Fiber support for Wasmtime" license = "Apache-2.0 WITH LLVM-exception" @@ -18,7 +18,7 @@ cfg-if = "1.0" [target.'cfg(unix)'.dependencies] rustix = { version = "0.35.6", features = ["mm", "param"] } -wasmtime-asm-macros = { version = "=1.0.1", path = "../asm-macros" } +wasmtime-asm-macros = { version = "=1.0.2", path = "../asm-macros" } [target.'cfg(windows)'.dependencies.windows-sys] version = "0.36.1" diff --git a/crates/jit-debug/Cargo.toml b/crates/jit-debug/Cargo.toml index 97642cab58fa..f4058c4b184b 100644 --- a/crates/jit-debug/Cargo.toml +++ b/crates/jit-debug/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-jit-debug" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "JIT debug interfaces support for Wasmtime" license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index 65d472a46be9..ec67bcad47cd 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-jit" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "JIT-style execution for WebAsssembly code in Cranelift" documentation = "https://docs.rs/wasmtime-jit" @@ -11,9 +11,9 @@ repository = "https://github.com/bytecodealliance/wasmtime" edition = "2021" [dependencies] -wasmtime-environ = { path = "../environ", version = "=1.0.1" } -wasmtime-jit-debug = { path = "../jit-debug", version = "=1.0.1", features = ["perf_jitdump"], optional = true } -wasmtime-runtime = { path = "../runtime", version = "=1.0.1" } +wasmtime-environ = { path = "../environ", version = "=1.0.2" } +wasmtime-jit-debug = { path = "../jit-debug", version = "=1.0.2", features = ["perf_jitdump"], optional = true } +wasmtime-runtime = { path = "../runtime", version = "=1.0.2" } thiserror = "1.0.4" target-lexicon = { version = "0.12.0", default-features = false } anyhow = "1.0" diff --git a/crates/runtime/Cargo.toml b/crates/runtime/Cargo.toml index 82d6cfc647d1..e4de47d87945 100644 --- a/crates/runtime/Cargo.toml +++ b/crates/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-runtime" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Runtime library support for Wasmtime" documentation = "https://docs.rs/wasmtime-runtime" @@ -11,10 +11,10 @@ repository = "https://github.com/bytecodealliance/wasmtime" edition = "2021" [dependencies] -wasmtime-asm-macros = { path = "../asm-macros", version = "=1.0.1" } -wasmtime-environ = { path = "../environ", version = "=1.0.1" } -wasmtime-fiber = { path = "../fiber", version = "=1.0.1", optional = true } -wasmtime-jit-debug = { path = "../jit-debug", version = "=1.0.1", features = ["gdb_jit_int"] } +wasmtime-asm-macros = { path = "../asm-macros", version = "=1.0.2" } +wasmtime-environ = { path = "../environ", version = "=1.0.2" } +wasmtime-fiber = { path = "../fiber", version = "=1.0.2", optional = true } +wasmtime-jit-debug = { path = "../jit-debug", version = "=1.0.2", features = ["gdb_jit_int"] } libc = { version = "0.2.112", default-features = false } log = "0.4.8" memoffset = "0.6.0" diff --git a/crates/runtime/src/cow.rs b/crates/runtime/src/cow.rs index a4364e6f3679..b138496cbce1 100644 --- a/crates/runtime/src/cow.rs +++ b/crates/runtime/src/cow.rs @@ -533,6 +533,9 @@ impl MemoryImageSlot { /// Map anonymous zeroed memory across the whole slot, /// inaccessible. Used both during instantiate and during drop. fn reset_with_anon_memory(&self) -> Result<()> { + if self.static_size == 0 { + return Ok(()); + } unsafe { let ptr = rustix::mm::mmap_anonymous( self.base as *mut c_void, diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs index 3082c3ae84bf..36cacd2b7414 100644 --- a/crates/runtime/src/instance/allocator/pooling.rs +++ b/crates/runtime/src/instance/allocator/pooling.rs @@ -19,8 +19,8 @@ use std::convert::TryFrom; use std::mem; use std::sync::Mutex; use wasmtime_environ::{ - DefinedMemoryIndex, DefinedTableIndex, HostPtr, Module, PrimaryMap, Tunables, VMOffsets, - WASM_PAGE_SIZE, + DefinedMemoryIndex, DefinedTableIndex, HostPtr, MemoryStyle, Module, PrimaryMap, Tunables, + VMOffsets, WASM_PAGE_SIZE, }; mod index_allocator; @@ -386,6 +386,20 @@ impl InstancePool { .defined_memory_index(memory_index) .expect("should be a defined memory since we skipped imported ones"); + match plan.style { + MemoryStyle::Static { bound } => { + let bound = bound * u64::from(WASM_PAGE_SIZE); + if bound < self.memories.static_memory_bound { + return Err(InstantiationError::Resource(anyhow!( + "static bound of {bound:x} bytes incompatible with \ + reservation of {:x} bytes", + self.memories.static_memory_bound, + ))); + } + } + MemoryStyle::Dynamic { .. } => {} + } + let memory = unsafe { std::slice::from_raw_parts_mut( self.memories.get_base(instance_index, defined_index), @@ -393,13 +407,19 @@ impl InstancePool { ) }; + let slot = if cfg!(memory_init_cow) { + Some( + self.memories + .take_memory_image_slot(instance_index, defined_index), + ) + } else { + None + }; if let Some(image) = runtime_info .memory_image(defined_index) .map_err(|err| InstantiationError::Resource(err.into()))? { - let mut slot = self - .memories - .take_memory_image_slot(instance_index, defined_index); + let mut slot = slot.unwrap(); let initial_size = plan.memory.minimum * WASM_PAGE_SIZE as u64; // If instantiation fails, we can propagate the error @@ -425,6 +445,7 @@ impl InstancePool { .map_err(InstantiationError::Resource)?, ); } else { + drop(slot); memories.push( Memory::new_static(plan, memory, Some(commit_memory_pages), None, unsafe { &mut *store.unwrap() @@ -657,6 +678,7 @@ struct MemoryPool { initial_memory_offset: usize, max_memories: usize, max_instances: usize, + static_memory_bound: u64, } impl MemoryPool { @@ -678,15 +700,11 @@ impl MemoryPool { ); } - let memory_size = if instance_limits.memory_pages > 0 { - usize::try_from( - u64::from(tunables.static_memory_bound) * u64::from(WASM_PAGE_SIZE) - + tunables.static_memory_offset_guard_size, - ) - .map_err(|_| anyhow!("memory reservation size exceeds addressable memory"))? - } else { - 0 - }; + let static_memory_bound = + u64::from(tunables.static_memory_bound) * u64::from(WASM_PAGE_SIZE); + let memory_size = + usize::try_from(static_memory_bound + tunables.static_memory_offset_guard_size) + .map_err(|_| anyhow!("memory reservation size exceeds addressable memory"))?; assert!( memory_size % crate::page_size() == 0, @@ -744,6 +762,7 @@ impl MemoryPool { max_memories, max_instances, max_memory_size: (instance_limits.memory_pages as usize) * (WASM_PAGE_SIZE as usize), + static_memory_bound, }; Ok(pool) diff --git a/crates/test-programs/Cargo.toml b/crates/test-programs/Cargo.toml index 3de7eddfc6d0..9e9927f09309 100644 --- a/crates/test-programs/Cargo.toml +++ b/crates/test-programs/Cargo.toml @@ -11,10 +11,10 @@ license = "Apache-2.0 WITH LLVM-exception" cfg-if = "1.0" [dev-dependencies] -wasi-common = { path = "../wasi-common", version = "1.0.1" } -wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "1.0.1" } -wasmtime = { path = "../wasmtime", version = "1.0.1" } -wasmtime-wasi = { path = "../wasi", version = "1.0.1", features = ["tokio"] } +wasi-common = { path = "../wasi-common", version = "1.0.2" } +wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "1.0.2" } +wasmtime = { path = "../wasmtime", version = "1.0.2" } +wasmtime-wasi = { path = "../wasi", version = "1.0.2", features = ["tokio"] } target-lexicon = "0.12.0" pretty_env_logger = "0.4.0" tempfile = "3.1.0" diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index a785ea36ac48..bb4f6bcb2292 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-types" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "WebAssembly type definitions for Cranelift" license = "Apache-2.0 WITH LLVM-exception" @@ -9,7 +9,7 @@ documentation = "https://docs.rs/wasmtime-types" edition = "2021" [dependencies] -cranelift-entity = { path = "../../cranelift/entity", version = "0.88.1", features = ['enable-serde'] } +cranelift-entity = { path = "../../cranelift/entity", version = "0.88.2", features = ['enable-serde'] } serde = { version = "1.0.94", features = ["derive"] } thiserror = "1.0.4" wasmparser = { version = "0.89.0", default-features = false } diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml index cacaa935cfad..6366af0fb5e6 100644 --- a/crates/wasi-common/Cargo.toml +++ b/crates/wasi-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-common" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "WASI implementation in Rust" license = "Apache-2.0 WITH LLVM-exception" @@ -20,7 +20,7 @@ links = "wasi-common-19" [dependencies] anyhow = "1.0" thiserror = "1.0" -wiggle = { path = "../wiggle", default-features = false, version = "=1.0.1" } +wiggle = { path = "../wiggle", default-features = false, version = "=1.0.2" } tracing = "0.1.19" cap-std = "0.25.0" cap-rand = "0.25.0" diff --git a/crates/wasi-common/cap-std-sync/Cargo.toml b/crates/wasi-common/cap-std-sync/Cargo.toml index e84bdd2f944e..b4cf318a8a43 100644 --- a/crates/wasi-common/cap-std-sync/Cargo.toml +++ b/crates/wasi-common/cap-std-sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-cap-std-sync" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "WASI implementation in Rust" license = "Apache-2.0 WITH LLVM-exception" @@ -12,7 +12,7 @@ edition = "2021" include = ["src/**/*", "README.md", "LICENSE" ] [dependencies] -wasi-common = { path = "../", version = "=1.0.1" } +wasi-common = { path = "../", version = "=1.0.2" } async-trait = "0.1" anyhow = "1.0" cap-std = "0.25.0" diff --git a/crates/wasi-common/tokio/Cargo.toml b/crates/wasi-common/tokio/Cargo.toml index 14e70d477c57..e3129520e83b 100644 --- a/crates/wasi-common/tokio/Cargo.toml +++ b/crates/wasi-common/tokio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-tokio" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "WASI implementation in Rust" license = "Apache-2.0 WITH LLVM-exception" @@ -11,9 +11,9 @@ edition = "2021" include = ["src/**/*", "LICENSE" ] [dependencies] -wasi-common = { path = "../", version = "=1.0.1" } -wasi-cap-std-sync = { path = "../cap-std-sync", version = "=1.0.1" } -wiggle = { path = "../../wiggle", version = "=1.0.1" } +wasi-common = { path = "../", version = "=1.0.2" } +wasi-cap-std-sync = { path = "../cap-std-sync", version = "=1.0.2" } +wiggle = { path = "../../wiggle", version = "=1.0.2" } tokio = { version = "1.8.0", features = [ "rt", "fs", "time", "io-util", "net", "io-std", "rt-multi-thread"] } cap-std = "0.25.0" anyhow = "1" diff --git a/crates/wasi-crypto/Cargo.toml b/crates/wasi-crypto/Cargo.toml index 9d820b43de37..35b7e2edb9c0 100644 --- a/crates/wasi-crypto/Cargo.toml +++ b/crates/wasi-crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-wasi-crypto" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Wasmtime implementation of the wasi-crypto API" documentation = "https://docs.rs/wasmtime-wasi-crypto" @@ -14,8 +14,8 @@ edition = "2021" [dependencies] anyhow = "1.0" wasi-crypto = { path = "spec/implementations/hostcalls/rust", version = "0.1.5" } -wasmtime = { path = "../wasmtime", version = "1.0.1", default-features = false } -wiggle = { path = "../wiggle", version = "=1.0.1" } +wasmtime = { path = "../wasmtime", version = "1.0.2", default-features = false } +wiggle = { path = "../wiggle", version = "=1.0.2" } [badges] maintenance = { status = "experimental" } diff --git a/crates/wasi-nn/Cargo.toml b/crates/wasi-nn/Cargo.toml index 513121cb54da..2c1b28ea54fa 100644 --- a/crates/wasi-nn/Cargo.toml +++ b/crates/wasi-nn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-wasi-nn" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "Wasmtime implementation of the wasi-nn API" documentation = "https://docs.rs/wasmtime-wasi-nn" @@ -14,7 +14,7 @@ edition = "2021" [dependencies] # These dependencies are necessary for the witx-generation macros to work: anyhow = "1.0" -wiggle = { path = "../wiggle", version = "=1.0.1" } +wiggle = { path = "../wiggle", version = "=1.0.2" } # These dependencies are necessary for the wasi-nn implementation: openvino = { version = "0.4.1", features = ["runtime-linking"] } diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index 05420421df20..60d670e3e071 100644 --- a/crates/wasi/Cargo.toml +++ b/crates/wasi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-wasi" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "WASI implementation in Rust" license = "Apache-2.0 WITH LLVM-exception" @@ -13,11 +13,11 @@ include = ["src/**/*", "README.md", "LICENSE", "build.rs"] build = "build.rs" [dependencies] -wasi-common = { path = "../wasi-common", version = "=1.0.1" } -wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "=1.0.1", optional = true } -wasi-tokio = { path = "../wasi-common/tokio", version = "=1.0.1", optional = true } -wiggle = { path = "../wiggle", default-features = false, version = "=1.0.1", features = ["wasmtime_integration"] } -wasmtime = { path = "../wasmtime", default-features = false, version = "1.0.1" } +wasi-common = { path = "../wasi-common", version = "=1.0.2" } +wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "=1.0.2", optional = true } +wasi-tokio = { path = "../wasi-common/tokio", version = "=1.0.2", optional = true } +wiggle = { path = "../wiggle", default-features = false, version = "=1.0.2", features = ["wasmtime_integration"] } +wasmtime = { path = "../wasmtime", default-features = false, version = "1.0.2" } anyhow = "1.0" [features] diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo.toml index f0cf76f9672b..5bf937dcb5aa 100644 --- a/crates/wasmtime/Cargo.toml +++ b/crates/wasmtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "High-level API to expose the Wasmtime runtime" documentation = "https://docs.rs/wasmtime" @@ -13,14 +13,14 @@ edition = "2021" rustdoc-args = ["--cfg", "nightlydoc"] [dependencies] -wasmtime-runtime = { path = "../runtime", version = "=1.0.1" } -wasmtime-environ = { path = "../environ", version = "=1.0.1" } -wasmtime-jit = { path = "../jit", version = "=1.0.1" } -wasmtime-cache = { path = "../cache", version = "=1.0.1", optional = true } -wasmtime-fiber = { path = "../fiber", version = "=1.0.1", optional = true } -wasmtime-cranelift = { path = "../cranelift", version = "=1.0.1", optional = true } -wasmtime-component-macro = { path = "../component-macro", version = "=1.0.1", optional = true } -wasmtime-component-util = { path = "../component-util", version = "=1.0.1", optional = true } +wasmtime-runtime = { path = "../runtime", version = "=1.0.2" } +wasmtime-environ = { path = "../environ", version = "=1.0.2" } +wasmtime-jit = { path = "../jit", version = "=1.0.2" } +wasmtime-cache = { path = "../cache", version = "=1.0.2", optional = true } +wasmtime-fiber = { path = "../fiber", version = "=1.0.2", optional = true } +wasmtime-cranelift = { path = "../cranelift", version = "=1.0.2", optional = true } +wasmtime-component-macro = { path = "../component-macro", version = "=1.0.2", optional = true } +wasmtime-component-util = { path = "../component-util", version = "=1.0.2", optional = true } target-lexicon = { version = "0.12.0", default-features = false } wasmparser = "0.89.0" anyhow = "1.0.19" diff --git a/crates/wast/Cargo.toml b/crates/wast/Cargo.toml index 1895d16e2171..f3470e619e2d 100644 --- a/crates/wast/Cargo.toml +++ b/crates/wast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmtime-wast" -version = "1.0.1" +version = "1.0.2" authors = ["The Wasmtime Project Developers"] description = "wast testing support for wasmtime" license = "Apache-2.0 WITH LLVM-exception" @@ -11,7 +11,7 @@ edition = "2021" [dependencies] anyhow = "1.0.19" -wasmtime = { path = "../wasmtime", version = "1.0.1", default-features = false, features = ['cranelift'] } +wasmtime = { path = "../wasmtime", version = "1.0.2", default-features = false, features = ['cranelift'] } wast = "46.0.0" log = "0.4" diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml index 85edeaf9dd35..e93083258c31 100644 --- a/crates/wiggle/Cargo.toml +++ b/crates/wiggle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wiggle" -version = "1.0.1" +version = "1.0.2" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] edition = "2021" license = "Apache-2.0 WITH LLVM-exception" @@ -13,11 +13,11 @@ include = ["src/**/*", "README.md", "LICENSE"] [dependencies] thiserror = "1" witx = { path = "../wasi-common/WASI/tools/witx", version = "0.9.1", optional = true } -wiggle-macro = { path = "macro", version = "=1.0.1" } +wiggle-macro = { path = "macro", version = "=1.0.2" } tracing = "0.1.26" bitflags = "1.2" async-trait = "0.1.42" -wasmtime = { path = "../wasmtime", version = "1.0.1", optional = true, default-features = false } +wasmtime = { path = "../wasmtime", version = "1.0.2", optional = true, default-features = false } anyhow = "1.0" [badges] diff --git a/crates/wiggle/generate/Cargo.toml b/crates/wiggle/generate/Cargo.toml index 73d066483107..fc9c99b22cb9 100644 --- a/crates/wiggle/generate/Cargo.toml +++ b/crates/wiggle/generate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wiggle-generate" -version = "1.0.1" +version = "1.0.2" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] license = "Apache-2.0 WITH LLVM-exception" edition = "2021" diff --git a/crates/wiggle/macro/Cargo.toml b/crates/wiggle/macro/Cargo.toml index 3dcf33c7bc0e..b38802514edc 100644 --- a/crates/wiggle/macro/Cargo.toml +++ b/crates/wiggle/macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wiggle-macro" -version = "1.0.1" +version = "1.0.2" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] edition = "2021" license = "Apache-2.0 WITH LLVM-exception" @@ -21,7 +21,7 @@ test = false doctest = false [dependencies] -wiggle-generate = { path = "../generate", version = "=1.0.1" } +wiggle-generate = { path = "../generate", version = "=1.0.2" } quote = "1.0" syn = { version = "1.0", features = ["full"] } proc-macro2 = "1.0" diff --git a/tests/all/pooling_allocator.rs b/tests/all/pooling_allocator.rs index e00a55b2f84a..44fb461ed723 100644 --- a/tests/all/pooling_allocator.rs +++ b/tests/all/pooling_allocator.rs @@ -615,6 +615,67 @@ fn drop_externref_global_during_module_init() -> Result<()> { Ok(()) } +#[test] +fn switch_image_and_non_image() -> Result<()> { + let mut c = Config::new(); + c.allocation_strategy(InstanceAllocationStrategy::Pooling { + instance_limits: InstanceLimits { + count: 1, + ..Default::default() + }, + strategy: Default::default(), + }); + let engine = Engine::new(&c)?; + let module1 = Module::new( + &engine, + r#" + (module + (memory 1) + (func (export "load") (param i32) (result i32) + local.get 0 + i32.load + ) + ) + "#, + )?; + let module2 = Module::new( + &engine, + r#" + (module + (memory (export "memory") 1) + (data (i32.const 0) "1234") + ) + "#, + )?; + + let assert_zero = || -> Result<()> { + let mut store = Store::new(&engine, ()); + let instance = Instance::new(&mut store, &module1, &[])?; + let func = instance.get_typed_func::(&mut store, "load")?; + assert_eq!(func.call(&mut store, 0)?, 0); + Ok(()) + }; + + // Initialize with a heap image and make sure the next instance, without an + // image, is zeroed + Instance::new(&mut Store::new(&engine, ()), &module2, &[])?; + assert_zero()?; + + // ... transition back to heap image and do this again + Instance::new(&mut Store::new(&engine, ()), &module2, &[])?; + assert_zero()?; + + // And go back to an image and make sure it's read/write on the host. + let mut store = Store::new(&engine, ()); + let instance = Instance::new(&mut store, &module2, &[])?; + let memory = instance.get_memory(&mut store, "memory").unwrap(); + let mem = memory.data_mut(&mut store); + assert!(mem.starts_with(b"1234")); + mem[..6].copy_from_slice(b"567890"); + + Ok(()) +} + #[test] #[cfg(target_pointer_width = "64")] fn instance_too_large() -> Result<()> { @@ -660,3 +721,44 @@ configured maximum of 16 bytes; breakdown of allocation requirement: Ok(()) } + +#[test] +fn zero_memory_pages_disallows_oob() -> Result<()> { + let mut config = Config::new(); + config.allocation_strategy(InstanceAllocationStrategy::Pooling { + strategy: PoolingAllocationStrategy::NextAvailable, + instance_limits: InstanceLimits { + count: 1, + memory_pages: 0, + ..Default::default() + }, + }); + + let engine = Engine::new(&config)?; + let module = Module::new( + &engine, + r#" + (module + (memory 0) + + (func (export "load") (param i32) (result i32) + local.get 0 + i32.load) + + (func (export "store") (param i32 ) + local.get 0 + local.get 0 + i32.store) + ) + "#, + )?; + let mut store = Store::new(&engine, ()); + let instance = Instance::new(&mut store, &module, &[])?; + let load32 = instance.get_typed_func::(&mut store, "load")?; + let store32 = instance.get_typed_func::(&mut store, "store")?; + for i in 0..31 { + assert!(load32.call(&mut store, 1 << i).is_err()); + assert!(store32.call(&mut store, 1 << i).is_err()); + } + Ok(()) +}