Skip to content

Commit af4ad9c

Browse files
authored
Redesigned crate architecture (#1497)
1 parent 76d04e2 commit af4ad9c

File tree

408 files changed

+28491
-2156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+28491
-2156
lines changed

Diff for: .dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
target/
2-
bindings/wasm/
2+
bindings/wasm/identity_wasm
33
bindings/grpc/target/

Diff for: .github/workflows/build-and-test.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
- '**.toml'
1818
- 'bindings/**'
1919
- '!bindings/**.md'
20-
- 'bindings/wasm/README.md' # the Readme contain txm tests
20+
- 'bindings/wasm/identity_wasm/README.md' # the Readme contain txm tests
2121

2222
env:
2323
RUST_BACKTRACE: full
@@ -172,7 +172,7 @@ jobs:
172172
# run examples only on ubuntu for now
173173
if: matrix.os == 'ubuntu-24.04'
174174
run: |
175-
cd bindings/wasm
175+
cd bindings/wasm/identity_wasm
176176
npm ci
177177
npm run test:readme:rust
178178
@@ -211,20 +211,20 @@ jobs:
211211

212212
- name: Install JS dependencies
213213
run: npm ci
214-
working-directory: bindings/wasm
214+
working-directory: bindings/wasm/identity_wasm
215215

216-
- name: Download bindings/wasm artifacts
216+
- name: Download bindings/wasm/identity_wasm artifacts
217217
uses: actions/download-artifact@v4
218218
with:
219219
name: identity-wasm-bindings-build
220-
path: bindings/wasm
220+
path: bindings/wasm/identity_wasm
221221

222222
- name: Start iota sandbox
223223
uses: './.github/actions/iota-rebase-sandbox/setup'
224224

225225
- name: Run Wasm examples
226226
run: npm run test:readme && npm run test:node
227-
working-directory: bindings/wasm
227+
working-directory: bindings/wasm/identity_wasm
228228

229229
test-wasm-firefox:
230230
needs: build-wasm
@@ -247,22 +247,22 @@ jobs:
247247

248248
- name: Install JS dependencies
249249
run: npm ci
250-
working-directory: bindings/wasm
250+
working-directory: bindings/wasm/identity_wasm
251251

252-
- name: Download bindings/wasm artifacts
252+
- name: Download bindings/wasm/identity_wasm artifacts
253253
uses: actions/download-artifact@v4
254254
with:
255255
name: identity-wasm-bindings-build
256-
path: bindings/wasm
256+
path: bindings/wasm/identity_wasm
257257

258258
- name: Start iota sandbox
259259
uses: './.github/actions/iota-rebase-sandbox/setup'
260260

261261
- name: Build Docker image
262262
uses: docker/[email protected]
263263
with:
264-
context: bindings/wasm/
265-
file: bindings/wasm/cypress/Dockerfile
264+
context: bindings/wasm/identity_wasm/
265+
file: bindings/wasm/identity_wasm/cypress/Dockerfile
266266
push: false
267267
tags: cypress-test:latest
268268
load: true
@@ -291,22 +291,22 @@ jobs:
291291

292292
- name: Install JS dependencies
293293
run: npm ci
294-
working-directory: bindings/wasm
294+
working-directory: bindings/wasm/identity_wasm
295295

296-
- name: Download bindings/wasm artifacts
296+
- name: Download bindings/wasm/identity_wasm artifacts
297297
uses: actions/download-artifact@v4
298298
with:
299299
name: identity-wasm-bindings-build
300-
path: bindings/wasm
300+
path: bindings/wasm/identity_wasm
301301

302302
- name: Start iota sandbox
303303
uses: './.github/actions/iota-rebase-sandbox/setup'
304304

305305
- name: Build Docker image
306306
uses: docker/[email protected]
307307
with:
308-
context: bindings/wasm/
309-
file: bindings/wasm/cypress/Dockerfile
308+
context: bindings/wasm/identity_wasm/
309+
file: bindings/wasm/identity_wasm/cypress/Dockerfile
310310
push: false
311311
tags: cypress-test:latest
312312
load: true

Diff for: .github/workflows/clippy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
with:
4141
args: --all-targets --all-features -- -D warnings
4242

43-
- name: Wasm clippy check
43+
- name: Wasm clippy check identity_wasm
4444
uses: actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4
4545
if: ${{ false }}
4646
with:
47-
args: --manifest-path ./bindings/wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings
47+
args: --manifest-path ./bindings/wasm/identity_wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings

Diff for: .github/workflows/format.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
- name: core fmt check
4646
run: cargo +nightly fmt --all -- --check
4747

48-
- name: wasm fmt check
49-
run: cargo +nightly fmt --manifest-path ./bindings/wasm/Cargo.toml --all -- --check
48+
- name: wasm fmt check identity_wasm
49+
run: cargo +nightly fmt --manifest-path ./bindings/wasm/identity_wasm/Cargo.toml --all -- --check
5050

5151
- name: Cargo.toml fmt check
5252
run:

Diff for: .github/workflows/shared-build-wasm.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
build-wasm:
2424
defaults:
2525
run:
26-
working-directory: bindings/wasm
26+
working-directory: bindings/wasm/identity_wasm
2727
shell: bash
2828
runs-on: ubuntu-latest
2929
strategy:
@@ -50,7 +50,7 @@ jobs:
5050
target-cache-enabled: true
5151
sccache-enabled: true
5252
sccache-path: ${{ matrix.sccache-path }}
53-
target-cache-path: bindings/wasm/target
53+
target-cache-path: bindings/wasm/identity_wasm/target
5454

5555
# Download a pre-compiled wasm-bindgen binary.
5656
- name: Install wasm-bindgen-cli
@@ -86,9 +86,9 @@ jobs:
8686
with:
8787
name: ${{ inputs.output-artifact-name }}
8888
path: |
89-
bindings/wasm/node
90-
bindings/wasm/web
91-
bindings/wasm/examples/dist
92-
bindings/wasm/docs
89+
bindings/wasm/identity_wasm/node
90+
bindings/wasm/identity_wasm/web
91+
bindings/wasm/identity_wasm/examples/dist
92+
bindings/wasm/identity_wasm/docs
9393
if-no-files-found: error
9494
retention-days: 1

Diff for: .github/workflows/wasm-automatic-release-and-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# owner/repository of workflow has to be static, see https://github.community/t/env-variables-in-uses/17466
1515
uses: iotaledger/identity.rs/.github/workflows/shared-release.yml@main
1616
with:
17-
changelog-config-path: ./bindings/wasm/.github_changelog_generator
17+
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
1818
pre-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+-(?<pre_release>\w+)\.\d+$
1919
main-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
2020
create-github-release: false

Diff for: .github/workflows/wasm-create-hotfix-pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
branch-regex: ^support\/wasm-v[0-9]+\.[0-9]+$
1717
tag-prefix: wasm-v
1818
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
19-
changelog-config-path: ./bindings/wasm/.github_changelog_generator
20-
changelog-path: ./bindings/wasm/CHANGELOG.md
19+
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
20+
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
2121
release-target: wasm
2222
secrets:
2323
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

Diff for: .github/workflows/wasm-create-release-pr.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
tag-postfix: -${{ github.event.inputs.release-type }}.
2828
tag-base: ${{ github.event.inputs.version }}
2929
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
30-
changelog-config-path: ./bindings/wasm/.github_changelog_generator
31-
changelog-path: ./bindings/wasm/CHANGELOG.md
30+
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
31+
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
3232
pr-body-text: On merge a pre-release will be published to npm.
3333
release-target: wasm
3434
secrets:
@@ -43,8 +43,8 @@ jobs:
4343
tag-prefix: wasm-v
4444
tag-base: ${{ github.event.inputs.version }}
4545
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
46-
changelog-config-path: ./bindings/wasm/.github_changelog_generator
47-
changelog-path: ./bindings/wasm/CHANGELOG.md
46+
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
47+
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
4848
release-target: wasm
4949
secrets:
5050
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ index.html
2727
*.hodl
2828
*.hodl.*
2929

30-
!/bindings/wasm/static/index.html
30+
!/bindings/wasm/identity_wasm/static/index.html
3131

3232
docs
3333
# ignore IOTA build artifacts & package locks

Diff for: .license_template

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Copyright {20\d{2}(-20\d{2})?} IOTA Stiftung{(?:, .+)?}
1+
{(\/\/ Copyright.*\n)*?}// {(Modifications )?}Copyright {(\(c\) )?}{20\d{2}(-20\d{2})?} IOTA Stiftung{(?:, .+)?}
22
// SPDX-License-Identifier: Apache-2.0

Diff for: Cargo.toml

+11-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ members = [
2323
"identity_ecdsa_verifier",
2424
"identity_eddsa_verifier",
2525
"examples",
26+
"identity_iota_interaction",
27+
"bindings/wasm/iota_interaction_ts",
2628
]
2729

28-
exclude = ["bindings/wasm", "bindings/grpc"]
30+
exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]
2931

3032
[workspace.dependencies]
3133
bls12_381_plus = { version = "0.8.17" }
@@ -38,3 +40,11 @@ zkryptium = { version = "0.2.2", default-features = false, features = ["bbsplus"
3840

3941
[workspace.lints.clippy]
4042
result_large_err = "allow"
43+
44+
[profile.release.package.iota_interaction_ts]
45+
opt-level = 's'
46+
# Enabling debug for profile.release may lead to more helpfull loged call stacks.
47+
# TODO: Clarify if 'debug = true' facilitates error analysis via console logs.
48+
# If not, remove the next line
49+
# If yes, describe the helping effect in the comment above
50+
# debug = true

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ IOTA Identity is a [Rust](https://www.rust-lang.org/) implementation of decentra
3333
3434
[Foreign Function Interface (FFI)](https://en.wikipedia.org/wiki/Foreign_function_interface) Bindings of this [Rust](https://www.rust-lang.org/) library to other programming languages:
3535
36-
- [Web Assembly](https://github.com/iotaledger/identity.rs/blob/feat/identity-rebased-alpha/bindings/wasm/) (JavaScript/TypeScript) -->
36+
- [Web Assembly](https://github.com/iotaledger/identity.rs/blob/feat/identity-rebased-alpha/bindings/wasm/identity_wasm/) (JavaScript/TypeScript) -->
3737

3838
## gRPC
3939

@@ -99,7 +99,7 @@ _Cargo.toml_
9999
Test this example using https://github.com/anko/txm: `txm README.md`
100100
101101
!test program
102-
cd ../..
102+
cd ../../..
103103
mkdir tmp
104104
cat | sed -e 's#identity_iota = { git = "[^"]*", tag = "[^"]*"#identity_iota = { path = "../identity_iota"#' > tmp/Cargo.toml
105105
echo '[workspace]' >>tmp/Cargo.toml

Diff for: bindings/grpc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ path = "src/main.rs"
2020
anyhow = "1.0"
2121
futures = { version = "0.3" }
2222
identity_eddsa_verifier = { path = "../../identity_eddsa_verifier" }
23-
identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt", "domain-linkage", "domain-linkage-fetch", "status-list-2021", "iota-client"] }
23+
identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt", "domain-linkage", "domain-linkage-fetch", "status-list-2021", "iota-client", "send-sync-storage"] }
2424
identity_jose = { path = "../../identity_jose" }
2525
identity_storage = { path = "../../identity_storage", features = ["memstore"] }
2626
identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] }

0 commit comments

Comments
 (0)