Browse Source

Update the crates.io publishing scripts (#580)

* Fix fuzz target compilation.

* Bump version to 0.7.0

* Temporarily disable fuzz tests

Temporarily disable fuzz tests until https://github.com/bytecodealliance/cranelift/issues/1216 is resolved.

* Fix publish-all.sh to not modify the witx crate.

* Remove the "publish = false" attribute from Lightbeam.

* Add a README.md for wasmtime-interface-types.

* Remove the "rust" category.

This fixes the following warning:

warning: the following are not valid category slugs and were ignored: rust. Please see https://crates.io/category_slugs for the list of all category slugs.

* Mark wasmtime-cli as "publish = false".

* Sort the publishing rules in topological order.

Also, publish nightly-only crates with cargo +nightly.
pull/581/head
Dan Gohman 5 years ago
committed by GitHub
parent
commit
c5f998add2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Cargo.toml
  2. 2
      crates/api/Cargo.toml
  3. 2
      crates/debug/Cargo.toml
  4. 3
      crates/environ/Cargo.toml
  5. 3
      crates/environ/src/lightbeam.rs
  6. 2
      crates/interface-types/Cargo.toml
  7. 4
      crates/interface-types/README.md
  8. 2
      crates/jit/Cargo.toml
  9. 3
      crates/lightbeam/Cargo.toml
  10. 2
      crates/misc/py/Cargo.toml
  11. 4
      crates/misc/rust/Cargo.toml
  12. 2
      crates/misc/rust/macro/Cargo.toml
  13. 2
      crates/obj/Cargo.toml
  14. 2
      crates/runtime/Cargo.toml
  15. 2
      crates/test-programs/Cargo.toml
  16. 2
      crates/test-programs/wasi-tests/Cargo.toml
  17. 2
      crates/wasi-c/Cargo.toml
  18. 2
      crates/wasi-common/Cargo.toml
  19. 2
      crates/wasi-common/wasi-common-cbindgen/Cargo.toml
  20. 2
      crates/wasi-common/wig/Cargo.toml
  21. 4
      crates/wasi-common/winx/Cargo.toml
  22. 2
      crates/wasi/Cargo.toml
  23. 2
      crates/wast/Cargo.toml
  24. 8
      fuzz/Cargo.toml
  25. 10
      scripts/cargo-chill.sh
  26. 43
      scripts/publish-all.sh
  27. 21
      scripts/test-all.sh

3
Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-cli"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Command-line interface for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
@ -11,6 +11,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
default-run = "wasmtime"
publish = false
[dependencies]
# Enable all supported architectures by default.

2
crates/api/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime"
version = "0.1.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "High-level API to expose the Wasmtime runtime"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/debug/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-debug"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Debug utils for WebAsssembly code in Cranelift"
license = "Apache-2.0 WITH LLVM-exception"

3
crates/environ/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-environ"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Standalone environment support for WebAsssembly code in Cranelift"
license = "Apache-2.0 WITH LLVM-exception"
@ -15,6 +15,7 @@ edition = "2018"
cranelift-codegen = { version = "0.50.0", features = ["enable-serde"] }
cranelift-entity = { version = "0.50.0", features = ["enable-serde"] }
cranelift-wasm = { version = "0.50.0", features = ["enable-serde"] }
wasmparser = "0.39.2"
lightbeam = { path = "../lightbeam", optional = true }
indexmap = "1.0.2"
rayon = "1.2"

3
crates/environ/src/lightbeam.rs

@ -10,7 +10,6 @@ use crate::cranelift::RelocSink;
use cranelift_codegen::{ir, isa};
use cranelift_entity::{PrimaryMap, SecondaryMap};
use cranelift_wasm::{DefinedFuncIndex, ModuleTranslationState};
use lightbeam;
/// A compiler that compiles a WebAssembly module with Lightbeam, directly translating the Wasm file.
pub struct Lightbeam;
@ -53,7 +52,7 @@ impl crate::compilation::Compiler for Lightbeam {
&mut codegen_session,
&mut reloc_sink,
i.as_u32(),
&lightbeam::wasmparser::FunctionBody::new(0, function_body.data),
&wasmparser::FunctionBody::new(0, function_body.data),
)
.expect("Failed to translate function. TODO: Stop this from panicking");
relocations.push(reloc_sink.func_relocs);

2
crates/interface-types/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-interface-types"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Support for wasm interface types with wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

4
crates/interface-types/README.md

@ -0,0 +1,4 @@
This crate implements a prototype of the wasm [interface types] proposal
for Wasmtime.
[interface types]: https://github.com/WebAssembly/interface-types

2
crates/jit/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-jit"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "JIT-style execution for WebAsssembly code in Cranelift"
license = "Apache-2.0 WITH LLVM-exception"

3
crates/lightbeam/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "lightbeam"
version = "0.0.0"
version = "0.7.0"
authors = ["The Lightbeam Project Developers"]
description = "An optimising one-pass streaming compiler for WebAssembly"
license = "Apache-2.0 WITH LLVM-exception"
@ -9,7 +9,6 @@ readme = "README.md"
categories = ["wasm"]
keywords = ["webassembly", "wasm", "compile", "compiler", "jit"]
edition = "2018"
publish = false
[dependencies]
smallvec = "1.0.0"

2
crates/misc/py/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-py"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Python extension for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

4
crates/misc/rust/Cargo.toml

@ -1,10 +1,10 @@
[package]
name = "wasmtime-rust"
version = "0.2.0"
version = "0.7.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "Rust extension for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
categories = ["wasm", "rust"]
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"

2
crates/misc/rust/macro/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-rust-macro"
version = "0.2.0"
version = "0.7.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "Macro support crate for wasmtime-rust"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/obj/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-obj"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Native object file output for WebAsssembly code in Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/runtime/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-runtime"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "Runtime library support for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/test-programs/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "test-programs"
version = "0.0.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
readme = "README.md"
edition = "2018"

2
crates/test-programs/wasi-tests/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasi-tests"
version = "0.0.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
readme = "README.md"
edition = "2018"

2
crates/wasi-c/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-wasi-c"
version = "0.2.0"
version = "0.7.0"
authors = ["The Cranelift Project Developers"]
description = "WASI API support for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/wasi-common/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasi-common"
version = "0.5.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "WASI implementation in Rust"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/wasi-common/wasi-common-cbindgen/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasi-common-cbindgen"
version = "0.5.0"
version = "0.7.0"
authors = ["Jakub Konka <kubkon@jakubkonka.com>"]
description = "Interface generator utilities used by wasi-common"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/wasi-common/wig/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wig"
version = "0.1.0"
version = "0.7.0"
authors = ["Dan Gohman <sunfish@mozilla.com>"]
description = "WebAssembly Interface Generator"
license = "Apache-2.0 WITH LLVM-exception"

4
crates/wasi-common/winx/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "winx"
version = "0.5.0"
version = "0.7.0"
authors = ["Jakub Konka <kubkon@jakubkonka.com>"]
description = "Windows API helper library"
license = "Apache-2.0 WITH LLVM-exception"
@ -12,7 +12,7 @@ bitflags = "1.0"
cvt = "0.1"
[dependencies.winapi]
version = "0.3"
version = "^0.3"
features = [
"std",
"errhandlingapi",

2
crates/wasi/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-wasi"
version = "0.2.0"
version = "0.7.0"
authors = ["The Cranelift Project Developers"]
description = "WASI API support for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

2
crates/wast/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-wast"
version = "0.2.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
description = "wast testing support for wasmtime"
license = "Apache-2.0 WITH LLVM-exception"

8
fuzz/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "wasmtime-fuzz"
version = "0.0.0"
version = "0.7.0"
authors = ["The Wasmtime Project Developers"]
edition = "2018"
publish = false
@ -11,9 +11,9 @@ cargo-fuzz = true
[dependencies]
wasmtime-environ = { path = "../crates/environ" }
wasmtime-jit = { path = "../crates/jit" }
cranelift-codegen = { version = "0.49", features = ["enable-serde"] }
cranelift-wasm = { version = "0.49", features = ["enable-serde"] }
cranelift-native = "0.49"
cranelift-codegen = "0.50"
cranelift-wasm = "0.50"
cranelift-native = "0.50"
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
wasmparser = { version = "0.39.2", default-features = false, features = ["core"] }
binaryen = "0.8.1"

10
scripts/cargo-chill.sh

@ -1,10 +0,0 @@
#!/bin/bash
set -euo pipefail
# This is a trivial wrapper around cargo which just forwards its arguments
# to cargo, and then sleeps for a few seconds, to allow for exteral services
# to update their indices.
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
cargo "$@"
sleep 10

43
scripts/publish-all.sh

@ -9,11 +9,13 @@ topdir=$(dirname "$0")/..
cd "$topdir"
# All the wasmtime-* crates have the same version number
version="0.2.0"
version="0.7.0"
# Update the version numbers of the crates to $version.
echo "Updating crate versions to $version"
find -name Cargo.toml -exec sed -i.bk -e "s/^version = .*/version = \"$version\"/" {} \;
find -name Cargo.toml \
-not -path ./crates/wasi-common/WASI/tools/witx/Cargo.toml \
-exec sed -i.bk -e "s/^version = \"[[:digit:]].*/version = \"$version\"/" {} \;
# Update our local Cargo.lock (not checked in).
cargo update
@ -23,8 +25,41 @@ scripts/test-all.sh
#
# Note that libraries need to be published in topological order.
echo git checkout -b bump-version-to-$version
echo git commit -a -m "\"Bump version to $version"\"
echo git tag v$version
echo git push
echo git push origin bump-version-to-$version
echo "# Don't forget to click the above link to open a pull-request!"
echo git push origin v$version
echo "find -name Cargo.toml -exec scripts/cargo-chill.sh publish --manifest-path {} \\;"
for cargo_toml in \
crates/wasi-common/wasi-common-cbindgen/Cargo.toml \
crates/wasi-common/winx/Cargo.toml \
crates/wasi-common/wig/Cargo.toml \
crates/wasi-common/Cargo.toml \
crates/lightbeam/Cargo.toml \
crates/environ/Cargo.toml \
crates/obj/Cargo.toml \
crates/runtime/Cargo.toml \
crates/debug/Cargo.toml \
crates/jit/Cargo.toml \
crates/wast/Cargo.toml \
crates/wasi-c/Cargo.toml \
crates/wasi/Cargo.toml \
crates/api/Cargo.toml \
crates/interface-types/Cargo.toml \
crates/misc/py/Cargo.toml \
crates/misc/rust/macro/Cargo.toml \
crates/misc/rust/Cargo.toml \
; do
version=""
case $cargo_toml in
crates/lightbeam/Cargo.toml) version=" +nightly" ;;
crates/misc/py/Cargo.toml) version=" +nightly" ;;
esac
echo cargo$version publish --manifest-path "$cargo_toml"
# Sleep for a few seconds to allow the server to update the index.
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
echo sleep 10
done

21
scripts/test-all.sh

@ -76,17 +76,18 @@ cargo doc
# Note LSAN is disabled due to https://github.com/google/sanitizers/issues/764
banner "cargo fuzz check"
if rustup toolchain list | grep -q nightly; then
if cargo install --list | grep -q cargo-fuzz; then
echo "cargo-fuzz found"
else
echo "installing cargo-fuzz"
cargo +nightly install cargo-fuzz
fi
# Temporarily disable fuzz tests until https://github.com/bytecodealliance/cranelift/issues/1216 is resolved
#if cargo install --list | grep -q cargo-fuzz; then
# echo "cargo-fuzz found"
#else
# echo "installing cargo-fuzz"
# cargo +nightly install cargo-fuzz
#fi
fuzz_module="1340712d77d3db3c79b4b0c1494df18615485480"
ASAN_OPTIONS=detect_leaks=0 \
cargo +nightly fuzz run compile \
"$topdir/fuzz/corpus/compile/$fuzz_module"
#fuzz_module="1340712d77d3db3c79b4b0c1494df18615485480"
#ASAN_OPTIONS=detect_leaks=0 \
#cargo +nightly fuzz run compile \
# "$topdir/fuzz/corpus/compile/$fuzz_module"
# Nightly is available, so also run lightbeam's tests, which we
# skipped earlier.

Loading…
Cancel
Save