提交 80595f82 编写于 作者: B Brandon Williams 提交者: bors-libra

sdk: create facade crate and release v0.0.1 to crates.io

Closes: #7827
上级 8aa99b1c
......@@ -1427,7 +1427,7 @@ dependencies = [
[[package]]
name = "diem-client"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"anyhow",
"bcs",
......@@ -1470,7 +1470,7 @@ dependencies = [
[[package]]
name = "diem-crypto"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"aes-gcm",
"anyhow",
......@@ -1508,7 +1508,7 @@ dependencies = [
[[package]]
name = "diem-crypto-derive"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"anyhow",
"diem-workspace-hack",
......@@ -1804,7 +1804,7 @@ dependencies = [
[[package]]
name = "diem-json-rpc-types"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"anyhow",
"bcs",
......@@ -2094,6 +2094,18 @@ dependencies = [
"tokio",
]
[[package]]
name = "diem-sdk"
version = "0.0.1"
dependencies = [
"diem-client",
"diem-crypto",
"diem-transaction-builder",
"diem-types",
"diem-workspace-hack",
"move-core-types",
]
[[package]]
name = "diem-secure-net"
version = "0.1.0"
......@@ -2236,7 +2248,7 @@ dependencies = [
[[package]]
name = "diem-transaction-builder"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"bcs",
"diem-types",
......@@ -2277,7 +2289,7 @@ dependencies = [
[[package]]
name = "diem-types"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"aes-gcm",
"anyhow",
......@@ -4207,7 +4219,7 @@ dependencies = [
[[package]]
name = "move-core-types"
version = "0.1.0"
version = "0.0.1"
dependencies = [
"anyhow",
"bcs",
......
......@@ -117,6 +117,7 @@ members = [
"network/netcore",
"network/simple-onchain-discovery",
"network/socket-bench-server",
"sdk",
"sdk/client",
"secure/key-manager",
"secure/net",
......@@ -185,6 +186,7 @@ default-members = [
"language/tools/move-explain",
"language/transaction-builder/generator",
"diem-node",
"sdk",
"secure/key-manager",
"storage/backup/backup-cli",
"storage/diemsum",
......
[package]
name = "diem-transaction-builder"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Generated transaction builders"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[dependencies]
......@@ -14,9 +14,8 @@ bcs = "0.1.2"
once_cell = "1.7.2"
serde = { version = "1.0.124", features = ["derive"] }
move-core-types = { path = "../../language/move-core/types" }
diem-types = { path = "../../types" }
diem-workspace-hack = { path = "../../common/workspace-hack" }
move-core-types = { path = "../../language/move-core/types", version = "0.0.1" }
diem-types = { path = "../../types", version = "0.0.1" }
proptest = { version = "1.0.0", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
......@@ -25,6 +24,7 @@ proptest-derive = { version = "0.3.0", optional = true }
proptest = "1.0.0"
proptest-derive = "0.3.0"
move-core-types = { path = "../../language/move-core/types", features = ["fuzzing"] }
diem-workspace-hack = { path = "../../common/workspace-hack" }
[features]
default = []
......
[package]
name = "diem-crypto-derive"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem custom derives for `diem-crypto`"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[lib]
proc-macro = true
[dependencies]
diem-workspace-hack = { path = "../../common/workspace-hack" }
syn = { version = "1.0.58", features = ["derive"] }
quote = "1.0.9"
proc-macro2 = "1.0.24"
[dev-dependencies]
anyhow = "1.0.38"
diem-workspace-hack = { path = "../../common/workspace-hack" }
[package]
name = "diem-crypto"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem diem-crypto"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[dependencies]
......@@ -32,9 +32,8 @@ thiserror = "1.0.24"
tiny-keccak = { version = "2.0.2", features = ["sha3"] }
x25519-dalek = { version = "0.1.0", package = "x25519-dalek-fiat", default-features = false, features = ["std"] }
aes-gcm = "0.8.0"
diem-crypto-derive = { path = "../crypto-derive" }
diem-crypto-derive = { path = "../crypto-derive", version = "0.0.1" }
bcs = "0.1.2"
diem-workspace-hack = { path = "../../common/workspace-hack" }
[dev-dependencies]
bitvec = "0.19.4"
......@@ -47,6 +46,8 @@ sha3 = "0.9.1"
serde_json = "1.0.64"
trybuild = "1.0.41"
diem-workspace-hack = { path = "../../common/workspace-hack" }
[features]
default = ["fiat"]
assert-private-keys-not-cloneable = []
......
[package]
name = "diem-json-rpc-types"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem JSONRPC Types"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[dependencies]
......@@ -17,10 +17,12 @@ serde_json = "1.0.64"
prost = "0.7.0"
bcs = "0.1.2"
diem-types = { path = "../../types" }
diem-crypto = { path = "../../crypto/crypto" }
diem-types = { path = "../../types", version = "0.0.1" }
diem-crypto = { path = "../../crypto/crypto", version = "0.0.1" }
move-core-types = { path = "../../language/move-core/types", version = "0.0.1" }
[dev-dependencies]
diem-workspace-hack = { path = "../../common/workspace-hack" }
move-core-types = { path = "../../language/move-core/types" }
[build-dependencies]
prost-build = "0.7.0"
[package]
name = "move-core-types"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Core types for Move"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[dependencies]
......@@ -23,13 +23,12 @@ serde = { version = "1.0.124", default-features = false }
serde_bytes = "0.11.5"
thiserror = "1.0.24"
diem-workspace-hack = { path = "../../../common/workspace-hack" }
[dev-dependencies]
proptest = "1.0.0"
proptest-derive = "0.3.0"
regex = "1.4.3"
serde_json = "1.0.64"
diem-workspace-hack = { path = "../../../common/workspace-hack" }
[features]
default = []
......
[package]
name = "diem-sdk"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem types"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = ["crates-io"]
edition = "2018"
[features]
default = ["client"]
client = ["diem-client"]
[dependencies]
diem-crypto = { path = "../crypto/crypto", version = "0.0.1" }
diem-types = { path = "../types", version = "0.0.1"}
move-core-types = { path = "../language/move-core/types", version = "0.0.1" }
diem-transaction-builder = { path = "../client/transaction-builder", version = "0.0.1" }
# Optional Dependencies
diem-client = { path = "./client", version = "0.0.1", optional = true }
[dev-dependencies]
diem-workspace-hack = { path = "../common/workspace-hack" }
[package]
name = "diem-client"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem JSON-RPC client"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[features]
......@@ -21,13 +21,15 @@ hex = "0.4.3"
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0.64"
diem-crypto = { path = "../../crypto/crypto" }
diem-json-rpc-types = { path = "../../json-rpc/types" }
diem-types = { path = "../../types" }
diem-workspace-hack = { path = "../../common/workspace-hack" }
diem-crypto = { path = "../../crypto/crypto", version = "0.0.1" }
diem-json-rpc-types = { path = "../../json-rpc/types", version = "0.0.1" }
diem-types = { path = "../../types", version = "0.0.1" }
# Optional Dependencies
reqwest = { version = "0.11.1", features = ["json"], optional = true }
tokio = { version = "1.2.0", features = ["time"], default_features = false, optional = true }
ureq = { version = "1.5.4", features = ["json", "native-tls"], default-features = false, optional = true }
ipnet = { version = "2.3", optional = true }
[dev-dependencies]
diem-workspace-hack = { path = "../../common/workspace-hack" }
# Publishing Runbook
When preparing to make a release of the SDK follow these steps:
1. Update version numbers of all crates to be published from `0.0.X` to `0.0.X
+ 1` including updating the version requirement for any packages which have
workspace dependencies which are also being published.
2. Perform a dry-run publish (use `cargo publish --dry-run`) in order to verify that publishing will be successful.
3. Create a PR and get it merged into master.
4. Once the PR has landed in master, check out the commit which does the versions bump.
5. Publish to crates.io
6. Create a git tag `git tag diem-sdk-v0.0.X HEAD` and push that tag to the diem/diem repository.
Here is the set of currently published packages that make up the diem-sdk:
* move-core-types
* diem-crypto-derive
* diem-crypto
* diem-types
* diem-transaction-builder
* diem-json-rpc-types
* diem-client
* diem-sdk
// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#[cfg(feature = "client")]
#[cfg_attr(docsrs, doc(cfg(feature = "client")))]
pub mod client {
pub use diem_client::*;
}
pub mod crypto {
pub use diem_crypto::*;
}
pub mod transaction_builder {
pub use diem_transaction_builder::stdlib::*;
}
pub mod types {
pub use diem_types::*;
}
pub mod move_types {
pub use move_core_types::*;
}
[package]
name = "diem-types"
version = "0.1.0"
version = "0.0.1"
authors = ["Diem Association <opensource@diem.com>"]
description = "Diem types"
repository = "https://github.com/diem/diem"
homepage = "https://diem.com"
license = "Apache-2.0"
publish = false
publish = ["crates-io"]
edition = "2018"
[dependencies]
......@@ -28,10 +28,9 @@ thiserror = "1.0.24"
tiny-keccak = { version = "2.0.2", default-features = false, features = ["sha3"] }
bcs = "0.1.2"
diem-crypto = { path = "../crypto/crypto" }
diem-crypto-derive = { path = "../crypto/crypto-derive" }
diem-workspace-hack = { path = "../common/workspace-hack" }
move-core-types = { path = "../language/move-core/types" }
diem-crypto = { path = "../crypto/crypto", version = "0.0.1" }
diem-crypto-derive = { path = "../crypto/crypto-derive", version = "0.0.1" }
move-core-types = { path = "../language/move-core/types", version = "0.0.1" }
[dev-dependencies]
regex = "1.4.3"
......@@ -41,6 +40,7 @@ serde_json = "1.0.64"
diem-crypto = { path = "../crypto/crypto", features = ["fuzzing"] }
move-core-types = { path = "../language/move-core/types", features = ["fuzzing"] }
diem-workspace-hack = { path = "../common/workspace-hack" }
[features]
default = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册