Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesigned crate architecture #1497

Merged
merged 51 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dbee3d7
Move identity_wasm package into new folder bindings/wasm/identity_wasm
chrisgitiota Dec 4, 2024
5d77eaa
Reorganize tsconfig and typedoc files
chrisgitiota Dec 4, 2024
cdf0129
Extend build scripts to handle multiple artifacts and add new binding…
chrisgitiota Dec 4, 2024
e7cc8eb
Merge branch 'feat/identity-rebased-alpha' into feat/wasm32-develop-a…
chrisgitiota Dec 4, 2024
9a9415a
Update identity_wasm/package.json to use shared build scripts
chrisgitiota Dec 4, 2024
2c21ec7
Initial version of the identity_iota_interaction crate
chrisgitiota Dec 5, 2024
4f9d0d6
Provide identity_iota_interaction crate types as `use identity_iota::…
chrisgitiota Dec 5, 2024
189481e
Initial version of iota_interactions_ts
chrisgitiota Dec 9, 2024
6445ddb
Prepare identity_iota_core/rebased for iota_interaction usage
chrisgitiota Dec 9, 2024
bdc03d3
Merge branch 'feat/identity-rebased-alpha' into feat/wasm32-develop-a…
chrisgitiota Dec 9, 2024
c393acb
Minor README fixes
chrisgitiota Dec 9, 2024
fe8376a
Updated identity_interaction_rust MoveCalls to the latest identity_io…
chrisgitiota Dec 9, 2024
f31eda4
First compilable but not successfully testable version of identity_io…
chrisgitiota Dec 12, 2024
0dfb752
add stubs for `ProgrammableTransaction` type chain
wulfraem Dec 13, 2024
7fea4db
re-add changes from `feat/add-iota_client_ts_sdk-impls` as closely as…
wulfraem Dec 13, 2024
d8627e5
Merge branch 'feat/identity-rebased-alpha' into feat/wasm32-develop-a…
chrisgitiota Jan 6, 2025
f348ff7
Use cloned native IotaTransactionBlockResponse instead of a BCS deser…
chrisgitiota Jan 7, 2025
c1e4cbf
Fix build warnings and fix MoveType implementation for IotaVerifiable…
chrisgitiota Jan 7, 2025
f46876f
Fix & allow clippy errors
chrisgitiota Jan 7, 2025
f4e7a99
Fix even more clippy errors
chrisgitiota Jan 7, 2025
57968c2
Elide superfluous explicit lifetimes
chrisgitiota Jan 7, 2025
4ed173c
Use rustfmt ignore to exclude identity_iota_interaction/src/sdk_types…
chrisgitiota Jan 8, 2025
1cc7e25
Fix rustfmt issues for identity_iota_core/src/iota_interaction_rust a…
chrisgitiota Jan 8, 2025
59f02b9
Fix rustfmt issues for bindings/wasm/iota_interaction_ts and identity…
chrisgitiota Jan 8, 2025
db8fe86
Update all paths for bindings/wasm/identity_wasm in al GH workflows f…
chrisgitiota Jan 8, 2025
425739a
Rollback removing bindings/wasm/iota_interaction_ts from the workspac…
chrisgitiota Jan 8, 2025
a22dd33
Fix format issue for step "wasm fmt check identity_wasm"
chrisgitiota Jan 8, 2025
59be0ac
Fix issue "identity_iota_core not compilable using --no-default-featu…
chrisgitiota Jan 9, 2025
e43ea51
Remove iota_interaction_ts related steps from github workflows as thi…
chrisgitiota Jan 9, 2025
ffff17f
Fix several dprint issues
chrisgitiota Jan 9, 2025
5dc7ff3
Add iota_interaction_ts build products as 'excludes' to the dprint co…
chrisgitiota Jan 9, 2025
806243e
Fixing paths to the bindings/wasm/identity_wasm crate in several READ…
chrisgitiota Jan 9, 2025
fa94623
fix dprint issue missing empty line at end of file
chrisgitiota Jan 9, 2025
f8e2435
Update licence_template file to allow optional "Modifications", "(c)"…
chrisgitiota Jan 9, 2025
8d993b3
Add missing copyright license comments
chrisgitiota Jan 9, 2025
3c75dc2
Narrowed the dockerignore filter down from "bindings/wasm" to "bindin…
chrisgitiota Jan 9, 2025
db5ec09
bindings/wasm projects identity_wasm and iota_interaction_ts can be b…
chrisgitiota Jan 14, 2025
59c335a
dprint refomated
chrisgitiota Jan 14, 2025
21978e2
Merge branch 'feat/identity-rebased-alpha' into feat/wasm32-develop-a…
chrisgitiota Jan 14, 2025
a1c72de
Removed IntentFn adapters and fixed several issues reulting from last…
chrisgitiota Jan 16, 2025
b0e0062
Fis issues clippy::needless_as_bytes as the len() directly available …
chrisgitiota Jan 16, 2025
2cd4861
Fis several rustfmt issues
chrisgitiota Jan 16, 2025
d6feacc
Fix even more clippy and rustfmt issues
chrisgitiota Jan 16, 2025
5fe26a3
Update .license_template
chrisgitiota Jan 16, 2025
a9f978c
Fix rustfmt issues in identity_wasm
chrisgitiota Jan 16, 2025
fc360a6
Merge remote-tracking branch 'origin/feat/wasm32-develop-alpha' into …
chrisgitiota Jan 16, 2025
9d5fd35
Fix dprint issues
chrisgitiota Jan 16, 2025
8fd0dd6
Added missing copyright
chrisgitiota Jan 16, 2025
3fe3a33
reactivated 'identity_resolver' dependency for feature iota-client on…
chrisgitiota Jan 17, 2025
ede9a82
Updated "typedoc" and "typedoc-plugin-markdown" npm dependencies and …
chrisgitiota Jan 17, 2025
f19c906
Fixed wrong paths in Readme example code tests configs
chrisgitiota Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
target/
bindings/wasm/
bindings/wasm/identity_wasm
bindings/grpc/target/
32 changes: 16 additions & 16 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- '**.toml'
- 'bindings/**'
- '!bindings/**.md'
- 'bindings/wasm/README.md' # the Readme contain txm tests
- 'bindings/wasm/identity_wasm/README.md' # the Readme contain txm tests

env:
RUST_BACKTRACE: full
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-24.04'
run: |
cd bindings/wasm
cd bindings/wasm/identity_wasm
npm ci
npm run test:readme:rust

Expand Down Expand Up @@ -211,20 +211,20 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

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

- name: Run Wasm examples
run: npm run test:readme && npm run test:node
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

test-wasm-firefox:
needs: build-wasm
Expand All @@ -247,22 +247,22 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

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

- name: Build Docker image
uses: docker/[email protected]
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
context: bindings/wasm/identity_wasm/
file: bindings/wasm/identity_wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true
Expand Down Expand Up @@ -291,22 +291,22 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

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

- name: Build Docker image
uses: docker/[email protected]
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
context: bindings/wasm/identity_wasm/
file: bindings/wasm/identity_wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
with:
args: --all-targets --all-features -- -D warnings

- name: Wasm clippy check
- name: Wasm clippy check identity_wasm
uses: actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4
if: ${{ false }}
with:
args: --manifest-path ./bindings/wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings
args: --manifest-path ./bindings/wasm/identity_wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
- name: core fmt check
run: cargo +nightly fmt --all -- --check

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

- name: Cargo.toml fmt check
run:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/shared-build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build-wasm:
defaults:
run:
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm
shell: bash
runs-on: ubuntu-latest
strategy:
Expand All @@ -50,7 +50,7 @@ jobs:
target-cache-enabled: true
sccache-enabled: true
sccache-path: ${{ matrix.sccache-path }}
target-cache-path: bindings/wasm/target
target-cache-path: bindings/wasm/identity_wasm/target

# Download a pre-compiled wasm-bindgen binary.
- name: Install wasm-bindgen-cli
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
with:
name: ${{ inputs.output-artifact-name }}
path: |
bindings/wasm/node
bindings/wasm/web
bindings/wasm/examples/dist
bindings/wasm/docs
bindings/wasm/identity_wasm/node
bindings/wasm/identity_wasm/web
bindings/wasm/identity_wasm/examples/dist
bindings/wasm/identity_wasm/docs
if-no-files-found: error
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/wasm-automatic-release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# owner/repository of workflow has to be static, see https://github.community/t/env-variables-in-uses/17466
uses: iotaledger/identity.rs/.github/workflows/shared-release.yml@main
with:
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
pre-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+-(?<pre_release>\w+)\.\d+$
main-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
create-github-release: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wasm-create-hotfix-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
branch-regex: ^support\/wasm-v[0-9]+\.[0-9]+$
tag-prefix: wasm-v
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
release-target: wasm
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wasm-create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
tag-postfix: -${{ github.event.inputs.release-type }}.
tag-base: ${{ github.event.inputs.version }}
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
pr-body-text: On merge a pre-release will be published to npm.
release-target: wasm
secrets:
Expand All @@ -43,8 +43,8 @@ jobs:
tag-prefix: wasm-v
tag-base: ${{ github.event.inputs.version }}
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
release-target: wasm
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ index.html
*.hodl
*.hodl.*

!/bindings/wasm/static/index.html
!/bindings/wasm/identity_wasm/static/index.html

docs
# ignore IOTA build artifacts & package locks
Expand Down
2 changes: 1 addition & 1 deletion .license_template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Copyright {20\d{2}(-20\d{2})?} IOTA Stiftung{(?:, .+)?}
{(\/\/ Copyright.*\n)*?}// {(Modifications )?}Copyright {(\(c\) )?}{20\d{2}(-20\d{2})?} IOTA Stiftung{(?:, .+)?}
// SPDX-License-Identifier: Apache-2.0
12 changes: 11 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ members = [
"identity_ecdsa_verifier",
"identity_eddsa_verifier",
"examples",
"identity_iota_interaction",
"bindings/wasm/iota_interaction_ts",
]

exclude = ["bindings/wasm", "bindings/grpc"]
exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]

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

[workspace.lints.clippy]
result_large_err = "allow"

[profile.release.package.iota_interaction_ts]
opt-level = 's'
# Enabling debug for profile.release may lead to more helpfull loged call stacks.
# TODO: Clarify if 'debug = true' facilitates error analysis via console logs.
# If not, remove the next line
# If yes, describe the helping effect in the comment above
# debug = true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IOTA Identity is a [Rust](https://www.rust-lang.org/) implementation of decentra

[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:

- [Web Assembly](https://github.com/iotaledger/identity.rs/blob/feat/identity-rebased-alpha/bindings/wasm/) (JavaScript/TypeScript) -->
- [Web Assembly](https://github.com/iotaledger/identity.rs/blob/feat/identity-rebased-alpha/bindings/wasm/identity_wasm/) (JavaScript/TypeScript) -->

## gRPC

Expand Down Expand Up @@ -99,7 +99,7 @@ _Cargo.toml_
Test this example using https://github.com/anko/txm: `txm README.md`

!test program
cd ../..
cd ../../..
mkdir tmp
cat | sed -e 's#identity_iota = { git = "[^"]*", tag = "[^"]*"#identity_iota = { path = "../identity_iota"#' > tmp/Cargo.toml
echo '[workspace]' >>tmp/Cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion bindings/grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "src/main.rs"
anyhow = "1.0"
futures = { version = "0.3" }
identity_eddsa_verifier = { path = "../../identity_eddsa_verifier" }
identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt", "domain-linkage", "domain-linkage-fetch", "status-list-2021", "iota-client"] }
identity_iota = { path = "../../identity_iota", features = ["resolver", "sd-jwt", "domain-linkage", "domain-linkage-fetch", "status-list-2021", "iota-client", "send-sync-storage"] }
identity_jose = { path = "../../identity_jose" }
identity_storage = { path = "../../identity_storage", features = ["memstore"] }
identity_stronghold = { path = "../../identity_stronghold", features = ["send-sync-storage"] }
Expand Down
Loading
Loading