Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #233 from arnauorriols/crates-restructuration
Browse files Browse the repository at this point in the history
Codebase-wide overhaul
  • Loading branch information
Arnau Orriols authored May 18, 2022
2 parents 53a643b + c9f93ed commit 8f1a7c7
Show file tree
Hide file tree
Showing 237 changed files with 10,323 additions and 15,059 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: run
args: --release --manifest-path '${{ github.workspace }}/examples/Cargo.toml'
args: --release --example full-example
8 changes: 2 additions & 6 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- "."
- "examples"

steps:
- uses: actions/checkout@v2
Expand All @@ -37,5 +33,5 @@ jobs:
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features --manifest-path=${{ matrix.package }}/Cargo.toml
name: clippy check (${{ matrix.package }})
args: --all-features
name: clippy check
6 changes: 1 addition & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- "."
- "examples"
steps:
- uses: actions/checkout@v2
- name: Install rustfmt with nightly toolchain
Expand All @@ -36,4 +32,4 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=${{ matrix.package }}/Cargo.toml --check
args: --check
11 changes: 7 additions & 4 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
unstable_features = true
imports_layout = "Vertical"
imports_granularity = "Crate"
comment_width = 120
imports_granularity = "crate"
max_width = 120
comment_width = 100 # make sure examples in docs fit when rendered
wrap_comments = true
format_code_in_doc_comments = true
format_macro_bodies = true
format_macro_matchers = true
normalize_comments = true
normalize_doc_attributes = true
wrap_comments = true
use_field_init_shorthand = true
version = "Two"
82 changes: 6 additions & 76 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,80 +1,10 @@
#cargo-features = ["named-profiles"]

[package]
name = "iota-streams"
version = "0.1.2"
authors = ["Vlad Semenov <[email protected]>", "Dyrell Chapman <[email protected]>", "Brord van Wierst <[email protected]>", "Arnau Orriols <[email protected]"]
edition = "2018"
license = "Apache-2.0/MIT"
readme = "README.md"
keywords = ["iota", "streams"]
description = "A Rust implementation of the IOTA Streams"
repository = "https://github.com/iotaledger/streams"
homepage = "https://wiki.iota.org/streams/libraries/rust/overview"

autoexamples = false

[lib]
name = "iota_streams"
crate-type = ["staticlib", "cdylib", "rlib"]

[workspace]
members = [
"iota-streams-core",
"iota-streams-ddml",
"iota-streams-app",
"iota-streams-app-channels",
]

# Members selected by default by Cargo commands like `test`
default-members = [
"iota-streams-core",
"iota-streams-ddml",
"iota-streams-app",
"iota-streams-app-channels",
]

exclude = [
"examples",
members = [
"spongos",
"lets",
"streams",
]

[features]
default = ["std", "tangle", "client"]
# Enable `std` feature in the subpackages
std = ["iota-streams-core/std", "iota-streams-ddml/std", "iota-streams-app/std", "iota-streams-app-channels/std"]
# Enable Tangle-specific abstractions and API in iota-streams-app and iota-streams-app-channels
tangle = ["iota-streams-app/tangle", "iota-streams-app-channels/tangle"]
# Enable Tangle transport client implementation (implies `tangle` feature)
client = ["iota-streams-app/client", "iota-streams-app-channels/client", "tangle"]
# Enable Tangle wasm-compatible client implementation (incompatile with `client` feature due to `iota-client/async` using `tokio`)
wasm-client = ["iota-streams-app/wasm-client", "iota-streams-app-channels/wasm-client"]
# Enable debug logging when fallible functions return Result::Err
err-location-log = ["iota-streams-core/err-location-log"]
# Enable synchronized transports using spin
sync-spin = ["iota-streams-app/sync-spin", "iota-streams-core/sync-spin"]
# Enable synchronized transports using parking-lot (implies `std`)
sync-parking-lot = ["iota-streams-app/sync-parking-lot", "iota-streams-core/sync-parking-lot", "std"]
# Enable Iota Identity logic for User identification/authentication
did = ["iota-streams-app/did", "iota-streams-app-channels/did"]

[dependencies]
iota-streams-core = { version = "0.1.2", path = "iota-streams-core", default-features = false }
iota-streams-ddml = { version = "0.1.2", path = "iota-streams-ddml", default-features = false }
iota-streams-app = { version = "0.1.2", path = "iota-streams-app", default-features = false }
iota-streams-app-channels = { version = "0.1.2", path = "iota-streams-app-channels", default-features = false }

#[profile.release-nostd]
#inherits = "release"
#opt-level = 's'
#debug = false
#rpath = false
#lto = true
#debug-assertions = false
#codegen-units = 1
#panic = "abort"

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
lto = true
#panic = 'abort'
[profile.dev]
incremental = true
19 changes: 0 additions & 19 deletions examples/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions examples/EXAMPLE.env

This file was deleted.

Loading

0 comments on commit 8f1a7c7

Please sign in to comment.