Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fmt toml and rust
Browse files Browse the repository at this point in the history
dndll committed Nov 13, 2023

Verified

This commit was signed with the committer’s verified signature.
Vlatombe Vincent Latombe
1 parent 923c2ba commit ccef36d
Showing 9 changed files with 90 additions and 78 deletions.
46 changes: 21 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
[profile.release]
codegen-units = 1
opt-level = "z"
lto = true
debug = false
panic = "abort"
codegen-units = 1
debug = false
lto = true
opt-level = "z"
overflow-checks = true
panic = "abort"

# [profile.dev]
# debug = 0

[workspace.package]
version = "2.0.0"
authors = ["Pagoda <[email protected]>"]
authors = [ "Pagoda <[email protected]>" ]
edition = "2021"
version = "2.0.0"

[workspace]
members = ["crates/*", "contracts/*", "bin/*"]
members = [ "crates/*", "contracts/*", "bin/*" ]
resolver = "2"

[workspace.dependencies]
# Nostd
borsh = { version = "0.10.3", default-features = false }
serde_with = { version = "3.4", default-features = false, features = [
"hex",
"base64",
"macros",
] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
borsh = { version = "0.10.3", default-features = false }
serde = { version = "1.0", default-features = false, features = [ "derive" ] }
serde_with = { version = "3.4", default-features = false, features = [ "hex", "base64", "macros" ] }

# Std aware
eyre = "0.6"
log = "0.4"
rand = "0.8"
hex = "0.4"
serde_json = "1.0"
futures = "0.3"
async-trait = "0.1"
eyre = "0.6"
futures = "0.3"
hex = "0.4"
log = "0.4"
rand = "0.8"
serde_json = "1.0"

# NEAR
near-sdk = "4.0.0"
near-crypto = "0.17.0"
near-jsonrpc-client = "0.6.0"
near-crypto = "0.17.0"
near-jsonrpc-client = "0.6.0"
near-jsonrpc-primitives = "0.17.0"
near-primitives = "0.17.0"
near-primitives = "0.17.0"
near-sdk = "4.0.0"
near-sdk-contract-tools = "1.0.1"
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
TAG_PREFIX := us-docker.pkg.dev/pagoda-solutions-dev/rollup-data-availability
IMAGE_TAG := 0.1.0

format:
taplo format
cargo fmt --all

submodules:
git submodule update --init --recursive
.PHONY: submodules
18 changes: 9 additions & 9 deletions contracts/blob-store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
name = "near-da-blob-store"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
name = "near-da-blob-store"
version = { workspace = true }

[lib]
crate-type = ["cdylib"]
crate-type = [ "cdylib" ]

[dependencies]
borsh = { workspace = true }
near-sdk = { workspace = true }
borsh = { workspace = true }
uint = { version = "0.9.3", default-features = false }
uint = { version = "0.9.3", default-features = false }

near-da-primitives = { path = "../../crates/primitives", default-features = false }

[dev-dependencies]
near-workspaces = { version = "0.8.0", features = ["unstable"] }
near-workspaces = { version = "0.8.0", features = [ "unstable" ] }
# FIXME: remove tilde
tokio = "~1.28"
anyhow = "1.0.75"
tokio = "~1.28"

[features]
default = ["std"]
std = ["near-da-primitives/std", "borsh/std", "uint/std"]
default = [ "std" ]
std = [ "near-da-primitives/std", "borsh/std", "uint/std" ]
18 changes: 9 additions & 9 deletions crates/da-rpc-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
name = "near-da-rpc-sys"
version.workspace = true
authors.workspace = true
edition.workspace = true
name = "near-da-rpc-sys"
version.workspace = true

[lib]
crate-type = ["cdylib", "staticlib"]
crate-type = [ "cdylib", "staticlib" ]

[dependencies]
libc = "*"
libc = "*"
once_cell = "*"
tokio = { version = "1.0", features = ["full"] }
tokio = { version = "1.0", features = [ "full" ] }
# TODO: move to eyre
anyhow = "*"
anyhow = "*"
da-rpc = { path = "../da-rpc", package = "near-da-rpc" }
ffi_helpers = "*"
da-rpc = { path = "../da-rpc", package = "near-da-rpc" }
openssl = { version = "0.10", features = ["vendored"] }
openssl = { version = "0.10", features = [ "vendored" ] }

[dev-dependencies]
pretty_env_logger = "*"

[build-dependencies]
cbindgen = "*"
which = "*"
which = "*"
24 changes: 12 additions & 12 deletions crates/da-rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
[package]
name = "near-da-rpc"
version.workspace = true
authors.workspace = true
edition.workspace = true
name = "near-da-rpc"
version.workspace = true

[dependencies]
log = { workspace = true }
eyre = { workspace = true }
async-trait = { workspace = true }
tokio = { version = "1.0", features = ["full"] }
futures = { workspace = true }
eyre = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
tokio = { version = "1.0", features = [ "full" ] }

# Serialization
serde = { workspace = true, default-features = true }
serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
serde_with = { workspace = true, default-features = true }

near-crypto = { workspace = true }
near-primitives = { workspace = true }
near-jsonrpc-client = { workspace = true }
near-crypto = { workspace = true }
near-da-primitives = { path = "../primitives" }
near-jsonrpc-client = { workspace = true }
near-jsonrpc-primitives = { workspace = true }
near-da-primitives = { path = "../primitives" }
near-primitives = { workspace = true }

[dev-dependencies]
pretty_env_logger = "*"

[build-dependencies]
cbindgen = "*"
which = "*"
which = "*"
24 changes: 12 additions & 12 deletions crates/erasure-commit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[package]
name = "near-da-erasure-commit"
version.workspace = true
authors.workspace = true
edition.workspace = true
name = "near-da-erasure-commit"
version.workspace = true

[dependencies]
borsh = { workspace = true }
serde_with = { workspace = true }
serde = { workspace = true }
borsh = { workspace = true }
hex = { workspace = true }
log = { workspace = true }
near-primitives = { workspace = true }
log = { workspace = true }
rand = { workspace = true }
hex = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_with = { workspace = true }

eyre = { workspace = true }
lambdaworks-crypto = "0.2"
lambdaworks-math = "0.2"
nalgebra = "*"
reed-solomon-novelpoly = "1"
lambdaworks-math = "0.2"
lambdaworks-crypto = "0.2"
nalgebra = "*"
eyre = { workspace = true }

[dev-dependencies]
16 changes: 8 additions & 8 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "near-da-primitives"
version.workspace = true
authors.workspace = true
edition.workspace = true
name = "near-da-primitives"
version.workspace = true

[dependencies]
serde_with = { workspace = true }
serde = { workspace = true }
borsh = { workspace = true }
borsh = { workspace = true }
near-primitives = { workspace = true, default-features = false, optional = true }
serde = { workspace = true }
serde_with = { workspace = true }

[dev-dependencies]
hex = { workspace = true }

[features]
default = ["std", "crypto"]
std = ["serde_with/std", "serde/std", "borsh/std"]
crypto = ["near-primitives"]
crypto = [ "near-primitives" ]
default = [ "std", "crypto" ]
std = [ "serde_with/std", "serde/std", "borsh/std" ]
6 changes: 3 additions & 3 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -2,6 +2,6 @@
# This specifies the version of Rust we use to build.
# Individual crates in the workspace may support a lower version, as indicated by `rust-version` field in each crate's `Cargo.toml`.
# The version specified below, should be at least as high as the maximum `rust-version` within the workspace.
channel = "1.72.0"
components = ["rustfmt", "rust-src"]
targets = ["wasm32-unknown-unknown"]
channel = "1.72.0"
components = [ "rustfmt", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
12 changes: 12 additions & 0 deletions taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exclude = [ ".direnv/**", "**/node_modules/**", "cdk-stack/**", "op-stack/**", "bin/light-client/**" ]
include = [ "**/*.toml" ]

[formatting]
align_comments = false
align_entries = true
allowed_blank_lines = 1
array_auto_collapse = true
array_auto_expand = true
column_width = 170
compact_arrays = false
reorder_keys = true

0 comments on commit ccef36d

Please sign in to comment.