From e835e1c82641825c9a0075ec140b1922d4f665ea Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 4 Sep 2024 18:29:02 +0700 Subject: [PATCH] chore(rust): Make a single workspace and remove all workspace dependecies. (#12) * chore(rust): Make a single workspace and remove all workspace dependencies. Update rust toolchain. * fix(rust/c509-certificate): Try and fix cargo.toml lint error * fix(rust): Fix clippy.toml missing entry * fix(rust/cbork): Copy cbork crates into builder properly * fix(rust/cbork): Fix package now * fix(rust/cbork): Fix cddl_parser library use statements * fix(rust/cbork): Code format * fix(rust/c509-certificate): Fix wasm library build for c509-certificate * fix(rust/c509-certificate): Remove obsolete Earthfile * feat(rust/hermes-ipfs): Fix doc comment formatting * fix(rust/cbork): Fix cbork abnf parser module name * fix(rust): Fix spelling mistake * fix(rust): Add dev convenience helpers in a Justfile * feat(general): Add command to sort the project spelling words list correctly * fix(general): Fix project dictionary sorting * feat(general): Add justfile for developer convenience and suggested pre-push hook that uses it. * fix(rust/c509-certificate): Remove redundant errors file from cbork crate * fix(rust/cbork): Add target which just exports the cbork executable we built. * fix(rust): Build everything in the workspace, including docs. * fix(rust/c509-certificate): Build js/wasm interop versions of c509 library, and export them. * fix: c509 file name (#13) * fix: move new c509 from cat-voice * fix: revert file * fix: revert file * fix: revert file * fix: format * fix: typo --------- Co-authored-by: Steven Johnson * fix(general): Make it required that pull requests need Scopes (to support proper auto-generation of changelogs). * fix(rust): Bump rust cat-ci version to release v3.2.00 * fix(rust): Make Cargo.toml more uniform, and refer to the about-to-be tagged version of the repo * fix(rust/cardano-chain-follower): Give the chain follower crate an explicit version. --------- Co-authored-by: bkioshn <35752733+bkioshn@users.noreply.github.com> --- .config/dictionaries/project.dic | 28 +++--- .github/workflows/semantic_pull_request.yml | 1 + Earthfile | 12 ++- Justfile | 20 ++++ docs/Earthfile | 2 +- git_hooks/Readme.md | 7 ++ git_hooks/pre-push | 34 +++++++ rust/Cargo.toml | 67 ++----------- rust/Earthfile | 22 ++++- rust/Justfile | 29 ++++++ rust/c509-certificate/.cargo/config.toml | 93 ------------------- rust/c509-certificate/.config/nextest.toml | 48 ---------- rust/c509-certificate/.idea/.gitignore | 5 - .../.idea/c509-certificate.iml | 12 --- rust/c509-certificate/.idea/modules.xml | 8 -- rust/c509-certificate/.idea/vcs.xml | 6 -- rust/c509-certificate/Cargo.toml | 43 ++------- rust/c509-certificate/Earthfile | 48 +++++----- rust/c509-certificate/clippy.toml | 1 - rust/c509-certificate/deny.toml | 78 ---------------- rust/c509-certificate/examples/cli/main.rs | 12 +-- rust/c509-certificate/rust-toolchain.toml | 3 - rust/c509-certificate/rustfmt.toml | 68 -------------- ..._identifier.rs => algorithm_identifier.rs} | 2 +- .../attribute.rs | 2 +- .../{c509_attributes => attributes}/data.rs | 0 .../{c509_attributes => attributes}/mod.rs | 0 .../src/{c509_big_uint.rs => big_uint.rs} | 1 + rust/c509-certificate/src/c509.rs | 2 +- .../alt_name.rs | 14 ++- .../extension/data.rs | 0 .../extension/mod.rs | 2 +- .../{c509_extensions => extensions}/mod.rs | 6 ++ .../data.rs | 0 .../general_name.rs | 2 +- .../mod.rs | 7 +- .../other_name_hw_module.rs | 2 +- .../data.rs | 0 .../mod.rs | 2 +- rust/c509-certificate/src/lib.rs | 20 ++-- .../src/{c509_name => name}/mod.rs | 5 +- .../src/{c509_name => name}/rdn.rs | 4 +- .../src/{c509_oid.rs => oid.rs} | 3 +- .../data.rs | 0 .../mod.rs | 2 +- rust/c509-certificate/src/tbs_cert.rs | 13 ++- .../src/{c509_time.rs => time.rs} | 0 rust/cardano-chain-follower/Cargo.toml | 17 ++-- .../Cargo.toml | 9 +- .../src/grammar/abnf_test.pest | 0 .../src/grammar/rfc_5234.pest | 0 .../src/lib.rs | 2 +- .../tests/abnf/invalid_abnf_sample_1.abnf | 0 .../tests/abnf/valid_abnf_rfc3339.abnf | 0 .../tests/abnf/valid_abnf_rfc5234.abnf | 0 .../tests/abnf/valid_abnf_rfc5234_core.abnf | 0 .../tests/abnf/valid_abnf_rfc8610.abnf | 0 .../tests/testsuite/abnf.rs | 2 +- .../tests/testsuite/alternations.rs | 2 +- .../tests/testsuite/character_sets.rs | 2 +- .../tests/testsuite/comments.rs | 2 +- .../tests/testsuite/common/mod.rs | 2 +- .../tests/testsuite/elements.rs | 2 +- .../tests/testsuite/groups.rs | 2 +- .../tests/testsuite/identifiers.rs | 2 +- .../tests/testsuite/main.rs | 0 .../tests/testsuite/repetitions.rs | 2 +- .../tests/testsuite/rules.rs | 2 +- .../tests/testsuite/values.rs | 2 +- .../Cargo.toml | 9 +- .../src/grammar/cddl_modules.pest | 0 .../src/grammar/cddl_test.pest | 0 .../src/grammar/postlude.cddl | 0 .../src/grammar/rfc_8610.pest | 0 .../src/grammar/rfc_9165.pest | 0 .../src/lib.rs | 2 +- .../tests/byte_sequences.rs | 2 +- .../tests/cddl.rs | 2 +- .../tests/cddl/invalid_rfc8610_sample_1.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_2.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_3.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_4.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_5.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_6.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_7.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_8.cddl | 0 .../tests/cddl/invalid_rfc8610_sample_9.cddl | 0 .../tests/cddl/valid_rfc8610_arrays.cddl | 0 .../tests/cddl/valid_rfc8610_ctrl_bits.cddl | 0 .../tests/cddl/valid_rfc8610_ctrl_ord.cddl | 0 .../tests/cddl/valid_rfc8610_ctrl_regexp.cddl | 0 .../tests/cddl/valid_rfc8610_ctrl_size.cddl | 0 .../cddl/valid_rfc8610_ctrl_within_and.cddl | 0 .../cddl/valid_rfc8610_cuts_in_maps.cddl | 0 .../valid_rfc8610_cuts_in_maps_alt_1.cddl | 0 .../valid_rfc8610_cuts_in_maps_alt_2.cddl | 0 .../valid_rfc8610_cuts_in_maps_alt_3.cddl | 0 .../valid_rfc8610_example_array_object.cddl | 0 .../valid_rfc8610_example_nested_object.cddl | 0 ...rfc8610_example_nested_object_compact.cddl | 0 .../tests/cddl/valid_rfc8610_generics.cddl | 0 .../cddl/valid_rfc8610_group_to_choice.cddl | 0 ...valid_rfc8610_non_deterministic_order.cddl | 0 .../tests/cddl/valid_rfc8610_occurence.cddl | 0 .../cddl/valid_rfc8610_op_precedence.cddl | 0 .../tests/cddl/valid_rfc8610_ranges.cddl | 0 .../valid_rfc8610_represenation_types.cddl | 0 .../cddl/valid_rfc8610_reputon_compact.cddl | 0 .../cddl/valid_rfc8610_reputon_full.cddl | 0 .../tests/cddl/valid_rfc8610_simple_1.cddl | 0 .../tests/cddl/valid_rfc8610_simple_2.cddl | 0 .../tests/cddl/valid_rfc8610_simple_3.cddl | 0 .../tests/cddl/valid_rfc8610_simple_4.cddl | 0 .../tests/cddl/valid_rfc8610_simple_5.cddl | 0 .../tests/cddl/valid_rfc8610_simple_6.cddl | 0 .../tests/cddl/valid_rfc8610_simple_7.cddl | 0 .../tests/cddl/valid_rfc8610_simple_8.cddl | 0 .../tests/cddl/valid_rfc8610_simple_9.cddl | 0 .../tests/cddl/valid_rfc8610_socket_plug.cddl | 0 .../cddl/valid_rfc8610_socket_plug_ext.cddl | 0 .../tests/cddl/valid_rfc8610_structs.cddl | 0 .../tests/cddl/valid_rfc8610_structs_alt.cddl | 0 .../tests/cddl/valid_rfc8610_tables.cddl | 0 .../tests/cddl/valid_rfc8610_tags.cddl | 0 .../tests/cddl/valid_rfc8610_unwrapping.cddl | 0 .../cddl/valid_rfc8610_unwrapping_alt.cddl | 0 .../tests/character_sets.rs | 2 +- .../tests/comments.rs | 2 +- .../tests/common/byte_sequences.rs | 0 .../tests/common/comments.rs | 0 .../tests/common/group_elements.rs | 0 .../tests/common/identifiers.rs | 0 .../tests/common/literal_values.rs | 0 .../tests/common/mod.rs | 2 +- .../tests/common/rules.rs | 0 .../tests/common/text_sequences.rs | 0 .../tests/common/type_declarations.rs | 0 .../tests/group_elements.rs | 2 +- .../tests/identifiers.rs | 2 +- .../tests/literal_values.rs | 2 +- .../tests/rules.rs | 2 +- .../tests/text_sequences.rs | 2 +- .../tests/type_declarations.rs | 2 +- rust/cbork/.cargo/config.toml | 93 ------------------- rust/cbork/.config/nextest.toml | 48 ---------- rust/cbork/Cargo.toml | 63 ++++--------- rust/cbork/Earthfile | 41 +------- rust/cbork/README.md | 73 ++++++++++++--- rust/cbork/cddl-linter/Cargo.toml | 17 ---- rust/cbork/cddl-linter/README.md | 13 --- rust/cbork/cddl-linter/src/errors.rs | 90 ------------------ rust/cbork/clippy.toml | 2 - rust/cbork/deny.toml | 79 ---------------- rust/cbork/rust-toolchain.toml | 3 - rust/cbork/rustfmt.toml | 68 -------------- rust/cbork/{cddl-linter => }/src/cli.rs | 3 +- rust/cbork/{cddl-linter => }/src/main.rs | 0 rust/clippy.toml | 1 + rust/deny.toml | 4 +- rust/hermes-ipfs/Cargo.toml | 26 +++--- rust/hermes-ipfs/src/lib.rs | 4 +- rust/rust-toolchain.toml | 2 +- 162 files changed, 381 insertions(+), 1068 deletions(-) create mode 100644 Justfile create mode 100644 git_hooks/Readme.md create mode 100755 git_hooks/pre-push create mode 100644 rust/Justfile delete mode 100644 rust/c509-certificate/.cargo/config.toml delete mode 100644 rust/c509-certificate/.config/nextest.toml delete mode 100644 rust/c509-certificate/.idea/.gitignore delete mode 100644 rust/c509-certificate/.idea/c509-certificate.iml delete mode 100644 rust/c509-certificate/.idea/modules.xml delete mode 100644 rust/c509-certificate/.idea/vcs.xml delete mode 100644 rust/c509-certificate/clippy.toml delete mode 100644 rust/c509-certificate/deny.toml delete mode 100644 rust/c509-certificate/rust-toolchain.toml delete mode 100644 rust/c509-certificate/rustfmt.toml rename rust/c509-certificate/src/{c509_algo_identifier.rs => algorithm_identifier.rs} (98%) rename rust/c509-certificate/src/{c509_attributes => attributes}/attribute.rs (99%) rename rust/c509-certificate/src/{c509_attributes => attributes}/data.rs (100%) rename rust/c509-certificate/src/{c509_attributes => attributes}/mod.rs (100%) rename rust/c509-certificate/src/{c509_big_uint.rs => big_uint.rs} (98%) rename rust/c509-certificate/src/{c509_extensions => extensions}/alt_name.rs (94%) rename rust/c509-certificate/src/{c509_extensions => extensions}/extension/data.rs (100%) rename rust/c509-certificate/src/{c509_extensions => extensions}/extension/mod.rs (99%) rename rust/c509-certificate/src/{c509_extensions => extensions}/mod.rs (98%) rename rust/c509-certificate/src/{c509_general_names => general_names}/data.rs (100%) rename rust/c509-certificate/src/{c509_general_names => general_names}/general_name.rs (99%) rename rust/c509-certificate/src/{c509_general_names => general_names}/mod.rs (97%) rename rust/c509-certificate/src/{c509_general_names => general_names}/other_name_hw_module.rs (98%) rename rust/c509-certificate/src/{c509_issuer_sig_algo => issuer_sig_algo}/data.rs (100%) rename rust/c509-certificate/src/{c509_issuer_sig_algo => issuer_sig_algo}/mod.rs (98%) rename rust/c509-certificate/src/{c509_name => name}/mod.rs (99%) rename rust/c509-certificate/src/{c509_name => name}/rdn.rs (98%) rename rust/c509-certificate/src/{c509_oid.rs => oid.rs} (99%) rename rust/c509-certificate/src/{c509_subject_pub_key_algo => subject_pub_key_algo}/data.rs (100%) rename rust/c509-certificate/src/{c509_subject_pub_key_algo => subject_pub_key_algo}/mod.rs (98%) rename rust/c509-certificate/src/{c509_time.rs => time.rs} (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/Cargo.toml (69%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/src/grammar/abnf_test.pest (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/src/grammar/rfc_5234.pest (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/src/lib.rs (98%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/abnf/invalid_abnf_sample_1.abnf (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/abnf/valid_abnf_rfc3339.abnf (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/abnf/valid_abnf_rfc5234.abnf (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/abnf/valid_abnf_rfc5234_core.abnf (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/abnf/valid_abnf_rfc8610.abnf (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/abnf.rs (97%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/alternations.rs (94%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/character_sets.rs (93%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/comments.rs (96%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/common/mod.rs (94%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/elements.rs (96%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/groups.rs (94%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/identifiers.rs (90%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/main.rs (100%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/repetitions.rs (95%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/rules.rs (96%) rename rust/{cbork/abnf-parser => cbork-abnf-parser}/tests/testsuite/values.rs (98%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/Cargo.toml (68%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/grammar/cddl_modules.pest (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/grammar/cddl_test.pest (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/grammar/postlude.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/grammar/rfc_8610.pest (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/grammar/rfc_9165.pest (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/src/lib.rs (98%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/byte_sequences.rs (93%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl.rs (96%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_1.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_2.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_3.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_4.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_5.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_6.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_7.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_8.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/invalid_rfc8610_sample_9.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_arrays.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ctrl_bits.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ctrl_ord.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ctrl_regexp.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ctrl_size.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ctrl_within_and.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_cuts_in_maps.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_cuts_in_maps_alt_1.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_cuts_in_maps_alt_2.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_cuts_in_maps_alt_3.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_example_array_object.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_example_nested_object.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_example_nested_object_compact.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_generics.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_group_to_choice.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_non_deterministic_order.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_occurence.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_op_precedence.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_ranges.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_represenation_types.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_reputon_compact.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_reputon_full.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_1.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_2.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_3.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_4.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_5.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_6.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_7.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_8.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_simple_9.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_socket_plug.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_socket_plug_ext.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_structs.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_structs_alt.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_tables.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_tags.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_unwrapping.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/cddl/valid_rfc8610_unwrapping_alt.cddl (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/character_sets.rs (99%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/comments.rs (91%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/byte_sequences.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/comments.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/group_elements.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/identifiers.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/literal_values.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/mod.rs (96%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/rules.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/text_sequences.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/common/type_declarations.rs (100%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/group_elements.rs (97%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/identifiers.rs (97%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/literal_values.rs (96%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/rules.rs (99%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/text_sequences.rs (89%) rename rust/{cbork/cddl-parser => cbork-cddl-parser}/tests/type_declarations.rs (99%) delete mode 100644 rust/cbork/.cargo/config.toml delete mode 100644 rust/cbork/.config/nextest.toml delete mode 100644 rust/cbork/cddl-linter/Cargo.toml delete mode 100644 rust/cbork/cddl-linter/README.md delete mode 100644 rust/cbork/cddl-linter/src/errors.rs delete mode 100644 rust/cbork/clippy.toml delete mode 100644 rust/cbork/deny.toml delete mode 100644 rust/cbork/rust-toolchain.toml delete mode 100644 rust/cbork/rustfmt.toml rename rust/cbork/{cddl-linter => }/src/cli.rs (95%) rename rust/cbork/{cddl-linter => }/src/main.rs (100%) diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index 0f148c27b..b2e068f2c 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -1,6 +1,6 @@ aarch -abnf ABNF +abnf addrr adminer anypolicy @@ -21,13 +21,13 @@ bootstrapper BROTLI cantopen cardano -cbor CBOR +cbor cbork cdylib CEST -chaincode CHAINCODE +chaincode chainsync childs Chotivichit @@ -50,18 +50,18 @@ DBSTATUS dbsync dcbor delegators -Dominik dockerhub +Dominik dotenv dotenvy dotglob drep dreps -earthfile Earthfile +earthfile encryptor -Eternl Errno +Eternl excalidraw fadvise fcntl @@ -119,10 +119,10 @@ localizable lookaside maindbname mapref -Metadatum -metadatum mdlint mdns +Metadatum +metadatum minicbor miniprotocol miniprotocols @@ -181,8 +181,8 @@ reqwest retriggering rlib rulelist -rulename RULENAME +rulename runable rustc rustdoc @@ -211,8 +211,8 @@ tacho testcase testcov testdocs -testunit testplan +testunit thiserror timelike timespec @@ -228,16 +228,16 @@ unixfs unlinkat upnp userid -UTXO utimensat +UTXO vitss Vkey vkey vkeywitness voteplan voteplans -wasi WASI +wasi wasip wasip wasip @@ -247,7 +247,7 @@ webassembly webpki WORKDIR xprivate -xprv XPRV +xprv xpub -yoroi \ No newline at end of file +yoroi diff --git a/.github/workflows/semantic_pull_request.yml b/.github/workflows/semantic_pull_request.yml index af68a443e..85cd0539e 100644 --- a/.github/workflows/semantic_pull_request.yml +++ b/.github/workflows/semantic_pull_request.yml @@ -13,6 +13,7 @@ jobs: name: Validate PR title uses: input-output-hk/catalyst-ci/.github/workflows/semantic_pull_request.yml@master with: + requireScope: true scopes: | rust rust/c509-certificate diff --git a/Earthfile b/Earthfile index 8469378de..2727dac5b 100644 --- a/Earthfile +++ b/Earthfile @@ -1,7 +1,7 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.1.24 AS mdlint-ci -IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.1.24 AS cspell-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.00 AS mdlint-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.00 AS cspell-ci FROM debian:stable-slim @@ -15,6 +15,14 @@ markdown-check-fix: DO mdlint-ci+MDLINT_LOCALLY --src=$(echo ${PWD}) --fix=--fix +# Make sure the project dictionary is properly sorted. +clean-spelling-list: + COPY .config/dictionaries/project.dic project.dic + RUN sort -d -f project.dic > new.dic + IF ! diff -q project.dic new.dic + SAVE ARTIFACT new.dic AS LOCAL .config/dictionaries/project.dic + END + # check-spelling : Check spelling in this repo inside a container. check-spelling: DO cspell-ci+CHECK diff --git a/Justfile b/Justfile new file mode 100644 index 000000000..33dd85054 --- /dev/null +++ b/Justfile @@ -0,0 +1,20 @@ +# use with https://github.com/casey/just +# +# Developer convenience functions + +default: + @just --list --unsorted + +# Fix and Check Markdown files +check-markdown: + earthly +markdown-check-fix + +# Check Spelling +check-spelling: + earthly +clean-spelling-list + earthly +check-spelling + + +# Pre Push Checks - intended to be run by a git pre-push hook. +pre-push: check-markdown check-spelling + just rust/pre-push diff --git a/docs/Earthfile b/docs/Earthfile index 97d24f44a..9a4bfec28 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.1.21 AS docs-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.00 AS docs-ci IMPORT .. AS repo diff --git a/git_hooks/Readme.md b/git_hooks/Readme.md new file mode 100644 index 000000000..e2397d16c --- /dev/null +++ b/git_hooks/Readme.md @@ -0,0 +1,7 @@ +# Sample .git hooks + +This directory contains sample git-hooks which can be used to improve the workflow of a developer. + +Simply copy these to your .git/hooks folder and make them executable. + +They can further be customized by editing them to suit your needs. diff --git a/git_hooks/pre-push b/git_hooks/pre-push new file mode 100755 index 000000000..0e850320e --- /dev/null +++ b/git_hooks/pre-push @@ -0,0 +1,34 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This Shows how we run basic checks which will fail in CI to speed up development and +# catch things which will fail immediately sooner. + +remote="$1" +url="$2" + +# Redirect output to stderr. +exec 1>&2 + +# Check for Noisy CI Issues before Pushing +if ! just pre-push; then + echo >&2 "Found CI Issues, not pushing" + exit 1 +fi + +exit 0 diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b210a8269..45da0f472 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,10 +1,16 @@ [workspace] resolver = "2" -members = ["c509-certificate", "cardano-chain-follower", "hermes-ipfs"] +members = [ + "c509-certificate", + "cardano-chain-follower", + "hermes-ipfs", + "cbork", + "cbork-abnf-parser", + "cbork-cddl-parser", +] [workspace.package] edition = "2021" -version = "0.0.1" authors = ["Steven Johnson "] homepage = "https://github.com/input-output-hk/catalyst-libs" repository = "https://github.com/input-output-hk/catalyst-libs" @@ -45,60 +51,3 @@ string_slice = "deny" unchecked_duration_subtraction = "deny" unreachable = "deny" missing_docs_in_private_items = "deny" - -[workspace.dependencies] -pallas = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "709acb19c52c6b789279ecc4bc8793b5d8b5abe9", version = "0.25.0" } -pallas-hardano = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "709acb19c52c6b789279ecc4bc8793b5d8b5abe9", version = "0.25.0" } - -wasmtime = "20.0.2" -rusty_ulid = "2.0.0" -anyhow = "1.0.71" -hex-literal = "0.4.1" -thiserror = "1.0.56" -hex = "0.4.3" -tracing = "0.1.40" -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -criterion = "0.5.1" -libtest-mimic = "0.7.0" -crossbeam-queue = "0.3.11" -bip39 = "2.0.0" -iana-time-zone = "0.1.60" -rand = "0.8.5" -bip32 = "0.5.1" -ed25519-bip32 = "0.4.1" -dashmap = "6.0.1" -once_cell = "1.19.0" -clap = "4.5.3" -build-info = "0.0.37" -build-info-build = "0.0.37" -derive_more = "0.99.17" -chrono = "0.4.35" -chrono-tz = "0.9.0" -saffron = "0.1.0" -tokio = "1.36.0" -libsqlite3-sys = "0.29.0" -stringzilla = "3.8.4" -serial_test = { version = "3.1.1", features = ["file_locks"] } -temp-dir = "0.1.13" -hdf5 = { git = "https://github.com/aldanor/hdf5-rust.git", rev = "694e900972fbf5ffbdd1a2294f57a2cc3a91c994", version = "0.8.1", features = [ - "static", - "blosc", -] } -blosc-src = { version = "0.3.0", features = ["lz4", "zlib", "zstd"] } -num_cpus = "1.16.0" -console = "0.15.8" -serde = "1.0" -serde_json = "1.0" -jsonschema = "0.18.0" -hmac = "0.12.1" -pbkdf2 = "0.12.2" -blake2b_simd = "1.0.2" -sha2 = "0.10" -ed25519-dalek = "2.1.1" -x509-cert = "0.2.5" -coset = "0.3.7" -libipld = "0.16.0" -rust-ipfs = "0.11.21" -rustyline-async = "0.4.2" -dirs = "5.0.1" -lipsum = "0.9.1" diff --git a/rust/Earthfile b/rust/Earthfile index 10eecebb0..6e1d8f8d4 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -1,13 +1,18 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.1.21 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.00 AS rust-ci + +# Use when debugging cat-ci locally. +# IMPORT ../../catalyst-ci/earthly/rust AS rust-ci # builder : Set up our target toolchains, and copy our files. builder: DO rust-ci+SETUP COPY Cargo.toml clippy.toml deny.toml rustfmt.toml . - COPY --dir .cargo .config c509-certificate cardano-chain-follower cbork hermes-ipfs . + COPY --dir .cargo .config c509-certificate cardano-chain-follower \ + cbork cbork-abnf-parser cbork-cddl-parser \ + hermes-ipfs . # check : Run basic check. check: @@ -21,11 +26,18 @@ build: DO rust-ci+EXECUTE \ --cmd="/scripts/std_build.py" \ + --output="release/[^\./]+" \ --args1="--libs=c509-certificate" \ --args2="--libs=cardano-chain-follower" \ - --args3="--libs=cbork" \ - --args4="--libs=hermes-ipfs" \ - --docs="false" + --args3="--libs=cbork-cddl-parser" \ + --args4="--libs=cbork-abnf-parser" \ + --args5="--libs=hermes-ipfs" \ + --args6="--bins=cbork/cbork" \ + --docs="true" + + SAVE ARTIFACT target/$TARGETARCH/doc doc + SAVE ARTIFACT target/release/cbork cbork + # local-ci-run: This step simulates the full CI run for local purposes only. local-ci-run: diff --git a/rust/Justfile b/rust/Justfile new file mode 100644 index 000000000..6a056fbdd --- /dev/null +++ b/rust/Justfile @@ -0,0 +1,29 @@ +# use with https://github.com/casey/just +# +# Hermes developer convenience functions + +# cspell: words prereqs, commitlog, rustls, nocapture + +default: + @just --list --unsorted + +# Show the dependency tree and all enabled feature flags of every crate. +cargo-tree: + cargo tree -e features,normal,build -f "{p}[{f}]" --workspace --frozen + +# Check Dependency licenses and CVE's +license-check: + cargo deny check --exclude-dev + +# Format the rust code +code-format: + cargo +nightly fmtfix + cargo +nightly fmtchk + +# Lint the rust code +code-lint: + cargo lintfix + cargo lint + +# Pre Push Checks +pre-push: code-format code-lint license-check diff --git a/rust/c509-certificate/.cargo/config.toml b/rust/c509-certificate/.cargo/config.toml deleted file mode 100644 index 2764f1df4..000000000 --- a/rust/c509-certificate/.cargo/config.toml +++ /dev/null @@ -1,93 +0,0 @@ -# Use MOLD linker where possible, but ONLY in CI applicable targets. - -# Configure how Docker container targets build. - -# If you want to customize these targets for a local build, then customize them in your: -# $CARGO_HOME/config.toml -# NOT in the project itself. -# These targets are ONLY the targets used by CI and inside docker builds. - -# DO NOT remove `"-C", "target-feature=+crt-static"` from the rustflags for these targets. - -# Should be the default to have fully static rust programs in CI -[target.x86_64-unknown-linux-musl] -linker = "clang" -rustflags = [ - "-C", "link-arg=-fuse-ld=/usr/bin/mold", - "-C", "target-feature=-crt-static" -] - -# Should be the default to have fully static rust programs in CI -[target.aarch64-unknown-linux-musl] -linker = "clang" -rustflags = [ - "-C", "link-arg=-fuse-ld=/usr/bin/mold", - "-C", "target-feature=-crt-static" -] - -[build] -rustflags = [] -rustdocflags = [ - "--enable-index-page", - "-Z", - "unstable-options", -] - -[profile.dev] -opt-level = 1 -debug = true -debug-assertions = true -overflow-checks = true -lto = false -panic = "unwind" -incremental = true -codegen-units = 256 - -[profile.release] -opt-level = 3 -debug = false -debug-assertions = false -overflow-checks = false -lto = "thin" -panic = "unwind" -incremental = false -codegen-units = 16 - -[profile.test] -opt-level = 3 -debug = true -lto = false -debug-assertions = true -incremental = true -codegen-units = 256 - -[profile.bench] -opt-level = 3 -debug = false -debug-assertions = false -overflow-checks = false -lto = "thin" -incremental = false -codegen-units = 16 - -[alias] -lint = "clippy --all-targets" -lintfix = "clippy --all-targets --fix --allow-dirty" -lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targets" - -docs = "doc --release --no-deps --document-private-items --bins --lib --examples" -# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options" -testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci" -testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci" -testdocs = "test --doc --release" - -# Rust formatting, MUST be run with +nightly -fmtchk = "fmt -- --check -v --color=always" -fmtfix = "fmt -- -v" - -[term] -quiet = false # whether cargo output is quiet -verbose = false # whether cargo provides verbose output -color = "auto" # whether cargo colorizes output use `CARGO_TERM_COLOR="off"` to disable. -progress.when = "never" # whether cargo shows progress bar -progress.width = 80 # width of progress bar \ No newline at end of file diff --git a/rust/c509-certificate/.config/nextest.toml b/rust/c509-certificate/.config/nextest.toml deleted file mode 100644 index 726524896..000000000 --- a/rust/c509-certificate/.config/nextest.toml +++ /dev/null @@ -1,48 +0,0 @@ -[store] -# The directory under the workspace root at which nextest-related files are -# written. Profile-specific storage is currently written to dir/. -# dir = "target/nextest" - -[profile.default] -# Print out output for failing tests as soon as they fail, and also at the end -# of the run (for easy scrollability). -failure-output = "immediate-final" - -# Do not cancel the test run on the first failure. -fail-fast = true - -status-level = "all" -final-status-level = "all" - -[profile.ci] -# Print out output for failing tests as soon as they fail, and also at the end -# of the run (for easy scrollability). -failure-output = "immediate-final" -# Do not cancel the test run on the first failure. -fail-fast = false - -status-level = "all" -final-status-level = "all" - - -[profile.ci.junit] -# Output a JUnit report into the given file inside 'store.dir/'. -# If unspecified, JUnit is not written out. - -path = "junit.xml" - -# The name of the top-level "report" element in JUnit report. If aggregating -# reports across different test runs, it may be useful to provide separate names -# for each report. -report-name = "nextest" - -# Whether standard output and standard error for passing tests should be stored in the JUnit report. -# Output is stored in the and elements of the element. -store-success-output = true - -# Whether standard output and standard error for failing tests should be stored in the JUnit report. -# Output is stored in the and elements of the element. -# -# Note that if a description can be extracted from the output, it is always stored in the -# element. -store-failure-output = true diff --git a/rust/c509-certificate/.idea/.gitignore b/rust/c509-certificate/.idea/.gitignore deleted file mode 100644 index b58b603fe..000000000 --- a/rust/c509-certificate/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/rust/c509-certificate/.idea/c509-certificate.iml b/rust/c509-certificate/.idea/c509-certificate.iml deleted file mode 100644 index 7c12fe5a9..000000000 --- a/rust/c509-certificate/.idea/c509-certificate.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/rust/c509-certificate/.idea/modules.xml b/rust/c509-certificate/.idea/modules.xml deleted file mode 100644 index 204ddafd8..000000000 --- a/rust/c509-certificate/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/rust/c509-certificate/.idea/vcs.xml b/rust/c509-certificate/.idea/vcs.xml deleted file mode 100644 index b2bdec2d7..000000000 --- a/rust/c509-certificate/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/rust/c509-certificate/Cargo.toml b/rust/c509-certificate/Cargo.toml index ab8d0e58e..2b695e457 100644 --- a/rust/c509-certificate/Cargo.toml +++ b/rust/c509-certificate/Cargo.toml @@ -6,47 +6,16 @@ version = "0.0.1" authors = [ "Arissara Chotivichit " ] -homepage = "https://input-output-hk.github.io/catalyst-libs" -repository = "https://github.com/input-output-hk/catalyst-libs" -license = "MIT OR Apache-2.0" -edition = "2021" +edition.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true [lib] crate-type = ["cdylib", "rlib"] -[lints.rust] -warnings = "deny" -missing_docs = "deny" -let_underscore_drop = "deny" -non_ascii_idents = "deny" -single_use_lifetimes = "deny" -trivial_casts = "deny" -trivial_numeric_casts = "deny" - -[lints.rustdoc] -broken_intra_doc_links = "deny" -invalid_codeblock_attributes = "deny" -invalid_html_tags = "deny" -invalid_rust_codeblocks = "deny" -bare_urls = "deny" -unescaped_backticks = "deny" - -[lints.clippy] -pedantic = { level = "deny", priority = -1 } -unwrap_used = "deny" -expect_used = "deny" -exit = "deny" -get_unwrap = "deny" -index_refutable_slice = "deny" -indexing_slicing = "deny" -match_on_vec_items = "deny" -match_wild_err_arm = "deny" -missing_panics_doc = "deny" -panic = "deny" -string_slice = "deny" -unchecked_duration_subtraction = "deny" -unreachable = "deny" -missing_docs_in_private_items = "deny" +[lints] +workspace = true [dependencies] minicbor = { version = "0.24", features = ["std"] } diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index 3c6a15fed..1022bedbb 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -1,31 +1,37 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.1.21 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.00 AS rust-ci -# builder : Set up our target toolchains, and copy our files. -builder: - DO rust-ci+SETUP +IMPORT .. AS rust-local +IMPORT ../.. AS repo - COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml src examples . +# build-wasm: Build wasm binaries for browser integration. +# TODO: +# - Create a `test` target which Executes tests for browsers (chrome/firefox) and also nodejs +# with the built wasm from this target. +# - Create a publish target which can publish the library to NPM for both Web and NodeJS. +# - Create a simple example web app and nodejs app which uses the library, and can be used to +# test it after publishing. +build-wasm: + FROM rust-local+build -# check : Run basic check. -check: - FROM +builder + COPY repo+repo-docs/repo/LICENSE-APACHE c509-certificate/. + COPY repo+repo-docs/repo/LICENSE-MIT c509-certificate/. - DO rust-ci+EXECUTE --cmd="/scripts/std_checks.py" + # We should be able to use the library in all these places, so build it for them all. + FOR target IN web nodejs bundler + RUN wasm-pack build c509-certificate --release --target "$target" --out-dir "pkg/$target" + END -# build : Build the C509 library -build: - FROM +builder - - DO rust-ci+EXECUTE \ - --cmd="/scripts/std_build.py" \ - --args1="--libs=c509-certificate" - - RUN cargo install wasm-pack --version=0.12.1 --locked + SAVE ARTIFACT ./c509-certificate/pkg /pkg # js-wasm-package-locally : Generate the wasm package and save it locally js-wasm-package-locally: - FROM +build - RUN wasm-pack build --target web - SAVE ARTIFACT ./pkg AS LOCAL ./pkg + FROM +build-wasm + + SAVE ARTIFACT /pkg AS LOCAL ./pkg + +# Test which runs check with all supported host tooling. Needs qemu or rosetta to run. +# Only used to validate tooling is working across host toolsets. +build-all-hosts: + BUILD --platform=linux/amd64 --platform=linux/arm64 +build-hosted diff --git a/rust/c509-certificate/clippy.toml b/rust/c509-certificate/clippy.toml deleted file mode 100644 index 6933b8164..000000000 --- a/rust/c509-certificate/clippy.toml +++ /dev/null @@ -1 +0,0 @@ -allow-expect-in-tests = true diff --git a/rust/c509-certificate/deny.toml b/rust/c509-certificate/deny.toml deleted file mode 100644 index 8047bb3dc..000000000 --- a/rust/c509-certificate/deny.toml +++ /dev/null @@ -1,78 +0,0 @@ -[graph] -targets = [ - "x86_64-unknown-linux-gnu", - "aarch64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "aarch64-apple-darwin", - "x86_64-apple-darwin", - "x86_64-pc-windows-msvc", - "wasm32-unknown-unknown", - "wasm32-wasip1", - "wasm32-wasip2", -] - -[advisories] -version = 2 -ignore = [ - { id = "RUSTSEC-2020-0168", reason = "`mach` is used by wasmtime and we have no control over that." }, - { id = "RUSTSEC-2021-0145", reason = "we don't target windows, and don;t use a custom global allocator." }, -] - -[bans] -multiple-versions = "warn" -wildcards = 'deny' -deny = [ - { crate = "openssl", use-instead = "rustls" }, - { crate = "openssl-sys", use-instead = "rustls" }, - "libssh2-sys", -] -skip = [] -skip-tree = [ - { crate = "windows-sys@0.48.0", reason = "a foundational crate for many that bumps far too frequently to ever have a shared version" }, -] - -[sources] -unknown-registry = "deny" -unknown-git = "deny" - -# List of URLs for allowed Git repositories -allow-git = [ - "https://github.com/input-output-hk/hermes.git", - "https://github.com/input-output-hk/catalyst-pallas.git", - "https://github.com/bytecodealliance/wasmtime", - "https://github.com/aldanor/hdf5-rust", -] - -[licenses] -version = 2 -unused-allowed-license = "allow" -confidence-threshold = 0.93 -allow = [ - "MIT", - "Apache-2.0", - "Unicode-DFS-2016", - "BSD-3-Clause", - "BSD-2-Clause", - "BlueOak-1.0.0", - "Apache-2.0 WITH LLVM-exception", - "CC0-1.0", - "ISC", - "Unicode-3.0", - "MPL-2.0", -] -exceptions = [] - -[[licenses.clarify]] -crate = "byte-array-literals" -expression = "Apache-2.0 WITH LLVM-exception" -license-files = [{ path = "../../../LICENSE", hash = 0x001c7e6c }] - -[[licenses.clarify]] -crate = "hdf5-src" -expression = "MIT" -license-files = [{ path = "../LICENSE-MIT", hash = 0x001c7e6c }] - -[[licenses.clarify]] -crate = "ring" -expression = "MIT" -license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] diff --git a/rust/c509-certificate/examples/cli/main.rs b/rust/c509-certificate/examples/cli/main.rs index f344200f0..816446f48 100644 --- a/rust/c509-certificate/examples/cli/main.rs +++ b/rust/c509-certificate/examples/cli/main.rs @@ -8,14 +8,14 @@ use std::{ use asn1_rs::{oid, Oid}; use c509_certificate::{ - c509_big_uint::UnwrappedBigUint, - c509_extensions::Extensions, - c509_issuer_sig_algo::IssuerSignatureAlgorithm, - c509_name::{rdn::RelativeDistinguishedName, Name, NameValue}, - c509_subject_pub_key_algo::SubjectPubKeyAlgorithm, - c509_time::Time, + big_uint::UnwrappedBigUint, + extensions::Extensions, + issuer_sig_algo::IssuerSignatureAlgorithm, + name::{rdn::RelativeDistinguishedName, Name, NameValue}, signing::{PrivateKey, PublicKey}, + subject_pub_key_algo::SubjectPubKeyAlgorithm, tbs_cert::TbsCert, + time::Time, }; use chrono::{DateTime, Utc}; use clap::Parser; diff --git a/rust/c509-certificate/rust-toolchain.toml b/rust/c509-certificate/rust-toolchain.toml deleted file mode 100644 index 08feed89d..000000000 --- a/rust/c509-certificate/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.78" -profile = "default" \ No newline at end of file diff --git a/rust/c509-certificate/rustfmt.toml b/rust/c509-certificate/rustfmt.toml deleted file mode 100644 index 1a0573b22..000000000 --- a/rust/c509-certificate/rustfmt.toml +++ /dev/null @@ -1,68 +0,0 @@ -# Enable unstable features: -# * imports_indent -# * imports_layout -# * imports_granularity -# * group_imports -# * reorder_impl_items -# * trailing_comma -# * where_single_line -# * wrap_comments -# * comment_width -# * blank_lines_upper_bound -# * condense_wildcard_suffixes -# * force_multiline_blocks -# * format_code_in_doc_comments -# * format_generated_files -# * hex_literal_case -# * inline_attribute_width -# * normalize_comments -# * normalize_doc_attributes -# * overflow_delimited_expr -unstable_features = true - -# Compatibility: -edition = "2021" - -# Tabs & spaces - Defaults, listed for clarity -tab_spaces = 4 -hard_tabs = false - -# Commas. -trailing_comma = "Vertical" -match_block_trailing_comma = true - -# General width constraints. -max_width = 100 - -# Comments: -normalize_comments = true -normalize_doc_attributes = true -wrap_comments = true -comment_width = 90 # small excess is okay but prefer 80 -format_code_in_doc_comments = true -format_generated_files = false - -# Imports. -imports_indent = "Block" -imports_layout = "Mixed" -group_imports = "StdExternalCrate" -reorder_imports = true -imports_granularity = "Crate" - -# Arguments: -use_small_heuristics = "Default" -fn_params_layout = "Compressed" -overflow_delimited_expr = true -where_single_line = true - -# Misc: -inline_attribute_width = 0 -blank_lines_upper_bound = 1 -reorder_impl_items = true -use_field_init_shorthand = true -force_multiline_blocks = true -condense_wildcard_suffixes = true -hex_literal_case = "Upper" - -# Ignored files: -ignore = [] \ No newline at end of file diff --git a/rust/c509-certificate/src/c509_algo_identifier.rs b/rust/c509-certificate/src/algorithm_identifier.rs similarity index 98% rename from rust/c509-certificate/src/c509_algo_identifier.rs rename to rust/c509-certificate/src/algorithm_identifier.rs index b11153c8a..89bca4b11 100644 --- a/rust/c509-certificate/src/c509_algo_identifier.rs +++ b/rust/c509-certificate/src/algorithm_identifier.rs @@ -17,7 +17,7 @@ use asn1_rs::Oid; use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; -use crate::c509_oid::C509oid; +use crate::oid::C509oid; /// A struct represents the `AlgorithmIdentifier` type. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] diff --git a/rust/c509-certificate/src/c509_attributes/attribute.rs b/rust/c509-certificate/src/attributes/attribute.rs similarity index 99% rename from rust/c509-certificate/src/c509_attributes/attribute.rs rename to rust/c509-certificate/src/attributes/attribute.rs index 507a5decb..1aa99740a 100644 --- a/rust/c509-certificate/src/c509_attributes/attribute.rs +++ b/rust/c509-certificate/src/attributes/attribute.rs @@ -16,7 +16,7 @@ use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Deserializer, Serialize}; use super::data::{get_oid_from_int, ATTRIBUTES_LOOKUP}; -use crate::c509_oid::{C509oid, C509oidRegistered}; +use crate::oid::{C509oid, C509oidRegistered}; /// A struct of C509 `Attribute` #[derive(Debug, Clone, PartialEq)] diff --git a/rust/c509-certificate/src/c509_attributes/data.rs b/rust/c509-certificate/src/attributes/data.rs similarity index 100% rename from rust/c509-certificate/src/c509_attributes/data.rs rename to rust/c509-certificate/src/attributes/data.rs diff --git a/rust/c509-certificate/src/c509_attributes/mod.rs b/rust/c509-certificate/src/attributes/mod.rs similarity index 100% rename from rust/c509-certificate/src/c509_attributes/mod.rs rename to rust/c509-certificate/src/attributes/mod.rs diff --git a/rust/c509-certificate/src/c509_big_uint.rs b/rust/c509-certificate/src/big_uint.rs similarity index 98% rename from rust/c509-certificate/src/c509_big_uint.rs rename to rust/c509-certificate/src/big_uint.rs index 8d844e2e8..a28e93305 100644 --- a/rust/c509-certificate/src/c509_big_uint.rs +++ b/rust/c509-certificate/src/big_uint.rs @@ -9,6 +9,7 @@ use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; /// A struct representing an unwrapped CBOR unsigned bignum. +#[allow(clippy::module_name_repetitions)] #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] pub struct UnwrappedBigUint(u64); diff --git a/rust/c509-certificate/src/c509.rs b/rust/c509-certificate/src/c509.rs index cde35592b..75cc23bfa 100644 --- a/rust/c509-certificate/src/c509.rs +++ b/rust/c509-certificate/src/c509.rs @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize}; use crate::tbs_cert::TbsCert; -#[derive(Deserialize, Serialize)] +#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] /// A struct represents the `C509` Certificate. pub struct C509 { /// A TBS Certificate. diff --git a/rust/c509-certificate/src/c509_extensions/alt_name.rs b/rust/c509-certificate/src/extensions/alt_name.rs similarity index 94% rename from rust/c509-certificate/src/c509_extensions/alt_name.rs rename to rust/c509-certificate/src/extensions/alt_name.rs index 7ab83513b..f5448ff03 100644 --- a/rust/c509-certificate/src/c509_extensions/alt_name.rs +++ b/rust/c509-certificate/src/extensions/alt_name.rs @@ -4,7 +4,7 @@ use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; -use crate::c509_general_names::{ +use crate::general_names::{ general_name::{GeneralName, GeneralNameTypeRegistry, GeneralNameValue}, GeneralNames, }; @@ -20,6 +20,12 @@ impl AlternativeName { pub fn new(value: GeneralNamesOrText) -> Self { Self(value) } + + /// Get the inner of Alternative Name. + #[must_use] + pub fn get_inner(&self) -> &GeneralNamesOrText { + &self.0 + } } impl Encode<()> for AlternativeName { @@ -55,11 +61,11 @@ impl Encode<()> for GeneralNamesOrText { match self { GeneralNamesOrText::GeneralNames(gns) => { let gn = gns - .get_gns() + .get_inner() .first() .ok_or(minicbor::encode::Error::message("GeneralNames is empty"))?; // Check whether there is only 1 item in the array which is a DNSName - if gns.get_gns().len() == 1 && gn.get_gn_type().is_dns_name() { + if gns.get_inner().len() == 1 && gn.get_gn_type().is_dns_name() { gn.get_gn_value().encode(e, ctx)?; } else { gns.encode(e, ctx)?; @@ -105,7 +111,7 @@ impl Decode<'_, ()> for GeneralNamesOrText { #[cfg(test)] mod test_alt_name { use super::*; - use crate::c509_general_names::general_name::{ + use crate::general_names::general_name::{ GeneralName, GeneralNameTypeRegistry, GeneralNameValue, }; diff --git a/rust/c509-certificate/src/c509_extensions/extension/data.rs b/rust/c509-certificate/src/extensions/extension/data.rs similarity index 100% rename from rust/c509-certificate/src/c509_extensions/extension/data.rs rename to rust/c509-certificate/src/extensions/extension/data.rs diff --git a/rust/c509-certificate/src/c509_extensions/extension/mod.rs b/rust/c509-certificate/src/extensions/extension/mod.rs similarity index 99% rename from rust/c509-certificate/src/c509_extensions/extension/mod.rs rename to rust/c509-certificate/src/extensions/extension/mod.rs index 264b98d1a..b2b82e549 100644 --- a/rust/c509-certificate/src/c509_extensions/extension/mod.rs +++ b/rust/c509-certificate/src/extensions/extension/mod.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use strum_macros::EnumDiscriminants; use super::alt_name::AlternativeName; -use crate::c509_oid::{C509oid, C509oidRegistered}; +use crate::oid::{C509oid, C509oidRegistered}; /// A struct of C509 `Extension` #[derive(Debug, Clone, PartialEq)] diff --git a/rust/c509-certificate/src/c509_extensions/mod.rs b/rust/c509-certificate/src/extensions/mod.rs similarity index 98% rename from rust/c509-certificate/src/c509_extensions/mod.rs rename to rust/c509-certificate/src/extensions/mod.rs index 71d71d422..1288f9e64 100644 --- a/rust/c509-certificate/src/c509_extensions/mod.rs +++ b/rust/c509-certificate/src/extensions/mod.rs @@ -51,6 +51,12 @@ impl Extensions { pub fn add_ext(&mut self, extension: Extension) { self.0.push(extension); } + + /// Get the inner vector of `Extensions`. + #[must_use] + pub fn get_inner(&self) -> &Vec { + &self.0 + } } impl Encode<()> for Extensions { diff --git a/rust/c509-certificate/src/c509_general_names/data.rs b/rust/c509-certificate/src/general_names/data.rs similarity index 100% rename from rust/c509-certificate/src/c509_general_names/data.rs rename to rust/c509-certificate/src/general_names/data.rs diff --git a/rust/c509-certificate/src/c509_general_names/general_name.rs b/rust/c509-certificate/src/general_names/general_name.rs similarity index 99% rename from rust/c509-certificate/src/c509_general_names/general_name.rs rename to rust/c509-certificate/src/general_names/general_name.rs index 9d7b06ecb..0549f37bb 100644 --- a/rust/c509-certificate/src/c509_general_names/general_name.rs +++ b/rust/c509-certificate/src/general_names/general_name.rs @@ -13,7 +13,7 @@ use super::{ data::{get_gn_from_int, get_gn_value_type_from_int, get_int_from_gn}, other_name_hw_module::OtherNameHardwareModuleName, }; -use crate::{c509_name::Name, c509_oid::C509oid}; +use crate::{name::Name, oid::C509oid}; /// A struct represents a `GeneralName`. /// ```cddl diff --git a/rust/c509-certificate/src/c509_general_names/mod.rs b/rust/c509-certificate/src/general_names/mod.rs similarity index 97% rename from rust/c509-certificate/src/c509_general_names/mod.rs rename to rust/c509-certificate/src/general_names/mod.rs index f5778fb01..1998733be 100644 --- a/rust/c509-certificate/src/c509_general_names/mod.rs +++ b/rust/c509-certificate/src/general_names/mod.rs @@ -36,8 +36,9 @@ impl GeneralNames { self.0.push(gn); } - /// Get the a vector of `GeneralName`. - pub(crate) fn get_gns(&self) -> &Vec { + /// Get the inner of `GeneralName`. + #[must_use] + pub fn get_inner(&self) -> &Vec { &self.0 } } @@ -85,7 +86,7 @@ mod test_general_names { use other_name_hw_module::OtherNameHardwareModuleName; use super::*; - use crate::c509_oid::C509oid; + use crate::oid::C509oid; #[test] fn encode_decode_gns() { diff --git a/rust/c509-certificate/src/c509_general_names/other_name_hw_module.rs b/rust/c509-certificate/src/general_names/other_name_hw_module.rs similarity index 98% rename from rust/c509-certificate/src/c509_general_names/other_name_hw_module.rs rename to rust/c509-certificate/src/general_names/other_name_hw_module.rs index 745b3cca0..b57697ce7 100644 --- a/rust/c509-certificate/src/c509_general_names/other_name_hw_module.rs +++ b/rust/c509-certificate/src/general_names/other_name_hw_module.rs @@ -7,7 +7,7 @@ use asn1_rs::Oid; use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; -use crate::c509_oid::C509oid; +use crate::oid::C509oid; /// A struct represents the hardwareModuleName type of otherName. /// Containing a pair of ( hwType, hwSerialNum ) as mentioned in diff --git a/rust/c509-certificate/src/c509_issuer_sig_algo/data.rs b/rust/c509-certificate/src/issuer_sig_algo/data.rs similarity index 100% rename from rust/c509-certificate/src/c509_issuer_sig_algo/data.rs rename to rust/c509-certificate/src/issuer_sig_algo/data.rs diff --git a/rust/c509-certificate/src/c509_issuer_sig_algo/mod.rs b/rust/c509-certificate/src/issuer_sig_algo/mod.rs similarity index 98% rename from rust/c509-certificate/src/c509_issuer_sig_algo/mod.rs rename to rust/c509-certificate/src/issuer_sig_algo/mod.rs index 33e67941c..ff63acae5 100644 --- a/rust/c509-certificate/src/c509_issuer_sig_algo/mod.rs +++ b/rust/c509-certificate/src/issuer_sig_algo/mod.rs @@ -14,7 +14,7 @@ use data::{get_oid_from_int, ISSUER_SIG_ALGO_LOOKUP}; use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Deserializer, Serialize}; -use crate::{c509_algo_identifier::AlgorithmIdentifier, c509_oid::C509oidRegistered}; +use crate::{algorithm_identifier::AlgorithmIdentifier, oid::C509oidRegistered}; /// A struct represents the `IssuerSignatureAlgorithm` #[derive(Debug, Clone, PartialEq)] diff --git a/rust/c509-certificate/src/lib.rs b/rust/c509-certificate/src/lib.rs index 56fea7c16..ae223655b 100644 --- a/rust/c509-certificate/src/lib.rs +++ b/rust/c509-certificate/src/lib.rs @@ -40,20 +40,20 @@ use c509::C509; use minicbor::{Decode, Encode}; use signing::{PrivateKey, PublicKey}; use tbs_cert::TbsCert; +pub mod algorithm_identifier; +pub mod attributes; +pub mod big_uint; pub mod c509; -pub mod c509_algo_identifier; -pub mod c509_attributes; -pub mod c509_big_uint; -pub mod c509_extensions; -pub mod c509_general_names; -pub mod c509_issuer_sig_algo; -pub mod c509_name; -pub mod c509_oid; -pub mod c509_subject_pub_key_algo; -pub mod c509_time; +pub mod extensions; +pub mod general_names; +pub mod issuer_sig_algo; +pub mod name; +pub mod oid; pub mod signing; +pub mod subject_pub_key_algo; mod tables; pub mod tbs_cert; +pub mod time; pub mod wasm_binding; /// Generate a signed or unsigned C509 certificate. diff --git a/rust/c509-certificate/src/c509_name/mod.rs b/rust/c509-certificate/src/name/mod.rs similarity index 99% rename from rust/c509-certificate/src/c509_name/mod.rs rename to rust/c509-certificate/src/name/mod.rs index 5e0028dfd..c41443907 100644 --- a/rust/c509-certificate/src/c509_name/mod.rs +++ b/rust/c509-certificate/src/name/mod.rs @@ -23,7 +23,7 @@ use rdn::RelativeDistinguishedName; use regex::Regex; use serde::{Deserialize, Serialize}; -use crate::c509_attributes::attribute::{Attribute, AttributeValue}; +use crate::attributes::attribute::{Attribute, AttributeValue}; /// OID of `CommonName` attribute. const COMMON_NAME_OID: Oid<'static> = oid!(2.5.4 .3); @@ -73,6 +73,7 @@ impl Decode<'_, ()> for Name { // ------------------NameValue---------------------- /// An enum of possible value types for `Name`. +#[allow(clippy::module_name_repetitions)] #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] #[serde(rename_all = "snake_case")] pub enum NameValue { @@ -283,7 +284,7 @@ fn create_rdn_with_cn_attr(text: String) -> NameValue { #[cfg(test)] pub(crate) mod test_name { use super::*; - use crate::c509_attributes::attribute::Attribute; + use crate::attributes::attribute::Attribute; // Test data from https://datatracker.ietf.org/doc/draft-ietf-cose-cbor-encoded-cert/09/ // A.1.1. Example C509 Certificate Encoding diff --git a/rust/c509-certificate/src/c509_name/rdn.rs b/rust/c509-certificate/src/name/rdn.rs similarity index 98% rename from rust/c509-certificate/src/c509_name/rdn.rs rename to rust/c509-certificate/src/name/rdn.rs index ef71481fa..13f5eb12f 100644 --- a/rust/c509-certificate/src/c509_name/rdn.rs +++ b/rust/c509-certificate/src/name/rdn.rs @@ -8,7 +8,7 @@ use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; -use crate::c509_attributes::attribute::Attribute; +use crate::attributes::attribute::Attribute; /// A struct represents a Relative Distinguished Name containing vector of `Attribute`. /// @@ -104,7 +104,7 @@ mod test_relative_distinguished_name { use asn1_rs::oid; use super::*; - use crate::c509_attributes::attribute::AttributeValue; + use crate::attributes::attribute::AttributeValue; #[test] fn encode_decode_rdn() { diff --git a/rust/c509-certificate/src/c509_oid.rs b/rust/c509-certificate/src/oid.rs similarity index 99% rename from rust/c509-certificate/src/c509_oid.rs rename to rust/c509-certificate/src/oid.rs index 646263a14..2a8ed92fd 100644 --- a/rust/c509-certificate/src/c509_oid.rs +++ b/rust/c509-certificate/src/oid.rs @@ -46,7 +46,8 @@ impl C509oidRegistered { } /// Get the `C509oid`. - pub(crate) fn get_c509_oid(&self) -> C509oid { + #[must_use] + pub fn get_c509_oid(&self) -> C509oid { self.oid.clone() } diff --git a/rust/c509-certificate/src/c509_subject_pub_key_algo/data.rs b/rust/c509-certificate/src/subject_pub_key_algo/data.rs similarity index 100% rename from rust/c509-certificate/src/c509_subject_pub_key_algo/data.rs rename to rust/c509-certificate/src/subject_pub_key_algo/data.rs diff --git a/rust/c509-certificate/src/c509_subject_pub_key_algo/mod.rs b/rust/c509-certificate/src/subject_pub_key_algo/mod.rs similarity index 98% rename from rust/c509-certificate/src/c509_subject_pub_key_algo/mod.rs rename to rust/c509-certificate/src/subject_pub_key_algo/mod.rs index 3c56175fb..014ad6e6c 100644 --- a/rust/c509-certificate/src/c509_subject_pub_key_algo/mod.rs +++ b/rust/c509-certificate/src/subject_pub_key_algo/mod.rs @@ -16,7 +16,7 @@ use data::{get_oid_from_int, SUBJECT_PUB_KEY_ALGO_LOOKUP}; use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Deserializer, Serialize}; -use crate::{c509_algo_identifier::AlgorithmIdentifier, c509_oid::C509oidRegistered}; +use crate::{algorithm_identifier::AlgorithmIdentifier, oid::C509oidRegistered}; /// A struct represents the `SubjectPubKeyAlgorithm` #[derive(Debug, Clone, PartialEq)] diff --git a/rust/c509-certificate/src/tbs_cert.rs b/rust/c509-certificate/src/tbs_cert.rs index 0154a5d40..c9f4b5558 100644 --- a/rust/c509-certificate/src/tbs_cert.rs +++ b/rust/c509-certificate/src/tbs_cert.rs @@ -4,9 +4,8 @@ use minicbor::{encode::Write, Decode, Decoder, Encode, Encoder}; use serde::{Deserialize, Serialize}; use crate::{ - c509_big_uint::UnwrappedBigUint, c509_extensions::Extensions, - c509_issuer_sig_algo::IssuerSignatureAlgorithm, c509_name::Name, - c509_subject_pub_key_algo::SubjectPubKeyAlgorithm, c509_time::Time, + big_uint::UnwrappedBigUint, extensions::Extensions, issuer_sig_algo::IssuerSignatureAlgorithm, + name::Name, subject_pub_key_algo::SubjectPubKeyAlgorithm, time::Time, }; /// A struct represents a To Be Signed Certificate (TBS Certificate). @@ -182,17 +181,17 @@ pub(crate) mod test_tbs_cert { use super::*; use crate::{ - c509_attributes::attribute::{Attribute, AttributeValue}, - c509_extensions::{ + attributes::attribute::{Attribute, AttributeValue}, + extensions::{ alt_name::{AlternativeName, GeneralNamesOrText}, extension::{Extension, ExtensionValue}, }, - c509_general_names::{ + general_names::{ general_name::{GeneralName, GeneralNameTypeRegistry, GeneralNameValue}, other_name_hw_module::OtherNameHardwareModuleName, GeneralNames, }, - c509_name::{ + name::{ rdn::RelativeDistinguishedName, test_name::{name_cn_eui_mac, name_cn_text, names}, NameValue, diff --git a/rust/c509-certificate/src/c509_time.rs b/rust/c509-certificate/src/time.rs similarity index 100% rename from rust/c509-certificate/src/c509_time.rs rename to rust/c509-certificate/src/time.rs diff --git a/rust/cardano-chain-follower/Cargo.toml b/rust/cardano-chain-follower/Cargo.toml index 0c0ee4a19..e8d6540fa 100644 --- a/rust/cardano-chain-follower/Cargo.toml +++ b/rust/cardano-chain-follower/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cardano-chain-follower" +version = "0.0.1" edition.workspace = true -version.workspace = true authors.workspace = true homepage.workspace = true repository.workspace = true @@ -11,12 +11,13 @@ license.workspace = true workspace = true [dependencies] -pallas.workspace = true -pallas-hardano.workspace = true -thiserror.workspace = true -tokio = { workspace = true, features = ["macros", "rt", "net", "rt-multi-thread"] } -tracing.workspace = true +pallas = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3", version = "0.30.1" } +pallas-hardano = { git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3", version = "0.30.1" } + +thiserror = "1.0.56" +tokio = { version = "1.36.0", features = ["macros", "rt", "net", "rt-multi-thread"] } +tracing = "0.1.40" [dev-dependencies] -hex.workspace = true -tracing-subscriber = { workspace = true, features = ["env-filter"] } +hex = "0.4.3" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/rust/cbork/abnf-parser/Cargo.toml b/rust/cbork-abnf-parser/Cargo.toml similarity index 69% rename from rust/cbork/abnf-parser/Cargo.toml rename to rust/cbork-abnf-parser/Cargo.toml index 33045ab32..6d438b813 100644 --- a/rust/cbork/abnf-parser/Cargo.toml +++ b/rust/cbork-abnf-parser/Cargo.toml @@ -1,10 +1,13 @@ #cspell: words memchr [package] -name = "abnf-parser" -version = "0.1.0" +name = "cbork-abnf-parser" +version = "0.0.1" edition.workspace = true license.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -12,7 +15,7 @@ license.workspace = true workspace = true [dependencies] -derive_more = "0.99.17" +derive_more = {version = "1.0.0", features = ["from"] } pest = { version = "2.7.2", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } pest_derive = { version = "2.7.2", features = ["grammar-extras"] } thiserror = "1.0.56" diff --git a/rust/cbork/abnf-parser/src/grammar/abnf_test.pest b/rust/cbork-abnf-parser/src/grammar/abnf_test.pest similarity index 100% rename from rust/cbork/abnf-parser/src/grammar/abnf_test.pest rename to rust/cbork-abnf-parser/src/grammar/abnf_test.pest diff --git a/rust/cbork/abnf-parser/src/grammar/rfc_5234.pest b/rust/cbork-abnf-parser/src/grammar/rfc_5234.pest similarity index 100% rename from rust/cbork/abnf-parser/src/grammar/rfc_5234.pest rename to rust/cbork-abnf-parser/src/grammar/rfc_5234.pest diff --git a/rust/cbork/abnf-parser/src/lib.rs b/rust/cbork-abnf-parser/src/lib.rs similarity index 98% rename from rust/cbork/abnf-parser/src/lib.rs rename to rust/cbork-abnf-parser/src/lib.rs index 6a62dc43e..47061ea7e 100644 --- a/rust/cbork/abnf-parser/src/lib.rs +++ b/rust/cbork-abnf-parser/src/lib.rs @@ -57,7 +57,7 @@ pub struct ABNFError(Error); /// # Examples /// /// ```rs -/// use abnf_parser::parse_abnf; +/// use cbork_abnf_parser::parse_abnf; /// use std:fs; /// /// let input = fs::read_to_string("path/to/your/file.abnf").unwrap(); diff --git a/rust/cbork/abnf-parser/tests/abnf/invalid_abnf_sample_1.abnf b/rust/cbork-abnf-parser/tests/abnf/invalid_abnf_sample_1.abnf similarity index 100% rename from rust/cbork/abnf-parser/tests/abnf/invalid_abnf_sample_1.abnf rename to rust/cbork-abnf-parser/tests/abnf/invalid_abnf_sample_1.abnf diff --git a/rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc3339.abnf b/rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc3339.abnf similarity index 100% rename from rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc3339.abnf rename to rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc3339.abnf diff --git a/rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc5234.abnf b/rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc5234.abnf similarity index 100% rename from rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc5234.abnf rename to rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc5234.abnf diff --git a/rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc5234_core.abnf b/rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc5234_core.abnf similarity index 100% rename from rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc5234_core.abnf rename to rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc5234_core.abnf diff --git a/rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc8610.abnf b/rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc8610.abnf similarity index 100% rename from rust/cbork/abnf-parser/tests/abnf/valid_abnf_rfc8610.abnf rename to rust/cbork-abnf-parser/tests/abnf/valid_abnf_rfc8610.abnf diff --git a/rust/cbork/abnf-parser/tests/testsuite/abnf.rs b/rust/cbork-abnf-parser/tests/testsuite/abnf.rs similarity index 97% rename from rust/cbork/abnf-parser/tests/testsuite/abnf.rs rename to rust/cbork-abnf-parser/tests/testsuite/abnf.rs index d397e781a..8750ed625 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/abnf.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/abnf.rs @@ -1,6 +1,6 @@ use std::{ffi::OsStr, fs, io::Result}; -use abnf_parser::parse_abnf; +use cbork_abnf_parser::parse_abnf; #[test] /// # Panics diff --git a/rust/cbork/abnf-parser/tests/testsuite/alternations.rs b/rust/cbork-abnf-parser/tests/testsuite/alternations.rs similarity index 94% rename from rust/cbork/abnf-parser/tests/testsuite/alternations.rs rename to rust/cbork-abnf-parser/tests/testsuite/alternations.rs index e24bcb4a4..4144dab9a 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/alternations.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/alternations.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/character_sets.rs b/rust/cbork-abnf-parser/tests/testsuite/character_sets.rs similarity index 93% rename from rust/cbork/abnf-parser/tests/testsuite/character_sets.rs rename to rust/cbork-abnf-parser/tests/testsuite/character_sets.rs index 74a591bb1..15b1d2125 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/character_sets.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/character_sets.rs @@ -1,6 +1,6 @@ // cspell: words VCHAR vchar -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/comments.rs b/rust/cbork-abnf-parser/tests/testsuite/comments.rs similarity index 96% rename from rust/cbork/abnf-parser/tests/testsuite/comments.rs rename to rust/cbork-abnf-parser/tests/testsuite/comments.rs index 3cce10349..9e06cabff 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/comments.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/comments.rs @@ -1,6 +1,6 @@ use std::ops::Deref; -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/common/mod.rs b/rust/cbork-abnf-parser/tests/testsuite/common/mod.rs similarity index 94% rename from rust/cbork/abnf-parser/tests/testsuite/common/mod.rs rename to rust/cbork-abnf-parser/tests/testsuite/common/mod.rs index 8f6f077c4..b86d16f97 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/common/mod.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/common/mod.rs @@ -1,4 +1,4 @@ -use abnf_parser::{ +use cbork_abnf_parser::{ self, abnf_test::{ABNFTestParser, Parser, Rule}, }; diff --git a/rust/cbork/abnf-parser/tests/testsuite/elements.rs b/rust/cbork-abnf-parser/tests/testsuite/elements.rs similarity index 96% rename from rust/cbork/abnf-parser/tests/testsuite/elements.rs rename to rust/cbork-abnf-parser/tests/testsuite/elements.rs index 33e25b824..318a1db66 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/elements.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/elements.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::{common::*, groups::*, identifiers::*, values::*}; diff --git a/rust/cbork/abnf-parser/tests/testsuite/groups.rs b/rust/cbork-abnf-parser/tests/testsuite/groups.rs similarity index 94% rename from rust/cbork/abnf-parser/tests/testsuite/groups.rs rename to rust/cbork-abnf-parser/tests/testsuite/groups.rs index 73370bf5c..fe94f88d8 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/groups.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/groups.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/identifiers.rs b/rust/cbork-abnf-parser/tests/testsuite/identifiers.rs similarity index 90% rename from rust/cbork/abnf-parser/tests/testsuite/identifiers.rs rename to rust/cbork-abnf-parser/tests/testsuite/identifiers.rs index 8045afba9..4e6f773eb 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/identifiers.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/identifiers.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/main.rs b/rust/cbork-abnf-parser/tests/testsuite/main.rs similarity index 100% rename from rust/cbork/abnf-parser/tests/testsuite/main.rs rename to rust/cbork-abnf-parser/tests/testsuite/main.rs diff --git a/rust/cbork/abnf-parser/tests/testsuite/repetitions.rs b/rust/cbork-abnf-parser/tests/testsuite/repetitions.rs similarity index 95% rename from rust/cbork/abnf-parser/tests/testsuite/repetitions.rs rename to rust/cbork-abnf-parser/tests/testsuite/repetitions.rs index db57d32b0..2c8852080 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/repetitions.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/repetitions.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/rules.rs b/rust/cbork-abnf-parser/tests/testsuite/rules.rs similarity index 96% rename from rust/cbork/abnf-parser/tests/testsuite/rules.rs rename to rust/cbork-abnf-parser/tests/testsuite/rules.rs index d8d1f9bab..88a3abd8d 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/rules.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/rules.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/abnf-parser/tests/testsuite/values.rs b/rust/cbork-abnf-parser/tests/testsuite/values.rs similarity index 98% rename from rust/cbork/abnf-parser/tests/testsuite/values.rs rename to rust/cbork-abnf-parser/tests/testsuite/values.rs index 79fdc92b3..eced93cb7 100644 --- a/rust/cbork/abnf-parser/tests/testsuite/values.rs +++ b/rust/cbork-abnf-parser/tests/testsuite/values.rs @@ -1,4 +1,4 @@ -use abnf_parser::{self, abnf_test::Rule}; +use cbork_abnf_parser::{self, abnf_test::Rule}; use crate::common::*; diff --git a/rust/cbork/cddl-parser/Cargo.toml b/rust/cbork-cddl-parser/Cargo.toml similarity index 68% rename from rust/cbork/cddl-parser/Cargo.toml rename to rust/cbork-cddl-parser/Cargo.toml index a060cbd75..fad6435f3 100644 --- a/rust/cbork/cddl-parser/Cargo.toml +++ b/rust/cbork-cddl-parser/Cargo.toml @@ -1,10 +1,13 @@ #cspell: words memchr [package] -name = "cddl-parser" -version = "0.1.0" +name = "cbork-cddl-parser" +version = "0.0.1" edition.workspace = true license.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -12,7 +15,7 @@ license.workspace = true workspace = true [dependencies] -derive_more = "0.99.17" +derive_more = {version = "1.0.0", features = ["from","display"] } pest = { version = "2.7.2", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } pest_derive = { version = "2.7.2", features = ["grammar-extras"] } thiserror = "1.0.56" diff --git a/rust/cbork/cddl-parser/src/grammar/cddl_modules.pest b/rust/cbork-cddl-parser/src/grammar/cddl_modules.pest similarity index 100% rename from rust/cbork/cddl-parser/src/grammar/cddl_modules.pest rename to rust/cbork-cddl-parser/src/grammar/cddl_modules.pest diff --git a/rust/cbork/cddl-parser/src/grammar/cddl_test.pest b/rust/cbork-cddl-parser/src/grammar/cddl_test.pest similarity index 100% rename from rust/cbork/cddl-parser/src/grammar/cddl_test.pest rename to rust/cbork-cddl-parser/src/grammar/cddl_test.pest diff --git a/rust/cbork/cddl-parser/src/grammar/postlude.cddl b/rust/cbork-cddl-parser/src/grammar/postlude.cddl similarity index 100% rename from rust/cbork/cddl-parser/src/grammar/postlude.cddl rename to rust/cbork-cddl-parser/src/grammar/postlude.cddl diff --git a/rust/cbork/cddl-parser/src/grammar/rfc_8610.pest b/rust/cbork-cddl-parser/src/grammar/rfc_8610.pest similarity index 100% rename from rust/cbork/cddl-parser/src/grammar/rfc_8610.pest rename to rust/cbork-cddl-parser/src/grammar/rfc_8610.pest diff --git a/rust/cbork/cddl-parser/src/grammar/rfc_9165.pest b/rust/cbork-cddl-parser/src/grammar/rfc_9165.pest similarity index 100% rename from rust/cbork/cddl-parser/src/grammar/rfc_9165.pest rename to rust/cbork-cddl-parser/src/grammar/rfc_9165.pest diff --git a/rust/cbork/cddl-parser/src/lib.rs b/rust/cbork-cddl-parser/src/lib.rs similarity index 98% rename from rust/cbork/cddl-parser/src/lib.rs rename to rust/cbork-cddl-parser/src/lib.rs index 2e1b75ec1..af8b4ab29 100644 --- a/rust/cbork/cddl-parser/src/lib.rs +++ b/rust/cbork-cddl-parser/src/lib.rs @@ -106,7 +106,7 @@ pub struct CDDLError(CDDLErrorType); /// # Examples /// /// ```rs -/// use cddl_parser::{parse_cddl, Extension}; +/// use cbork_cddl_parser::{parse_cddl, Extension}; /// use std:fs; /// /// let mut input = fs::read_to_string("path/to/your/file.cddl").unwrap(); diff --git a/rust/cbork/cddl-parser/tests/byte_sequences.rs b/rust/cbork-cddl-parser/tests/byte_sequences.rs similarity index 93% rename from rust/cbork/cddl-parser/tests/byte_sequences.rs rename to rust/cbork-cddl-parser/tests/byte_sequences.rs index 5df53da86..6f5ea0215 100644 --- a/rust/cbork/cddl-parser/tests/byte_sequences.rs +++ b/rust/cbork-cddl-parser/tests/byte_sequences.rs @@ -1,6 +1,6 @@ // cspell: words hexpair rstuvw abcdefghijklmnopqrstuvwyz rstuvw Xhhb Bhcm -use cddl_parser::cddl_test::Rule; +use cbork_cddl_parser::cddl_test::Rule; mod common; use common::byte_sequences::*; diff --git a/rust/cbork/cddl-parser/tests/cddl.rs b/rust/cbork-cddl-parser/tests/cddl.rs similarity index 96% rename from rust/cbork/cddl-parser/tests/cddl.rs rename to rust/cbork-cddl-parser/tests/cddl.rs index b2e9f525c..9adc9384d 100644 --- a/rust/cbork/cddl-parser/tests/cddl.rs +++ b/rust/cbork-cddl-parser/tests/cddl.rs @@ -1,6 +1,6 @@ use std::{ffi::OsStr, fs, io::Result}; -use cddl_parser::{parse_cddl, Extension}; +use cbork_cddl_parser::{parse_cddl, Extension}; #[test] /// # Panics diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_1.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_1.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_1.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_1.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_2.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_2.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_2.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_2.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_3.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_3.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_3.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_3.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_4.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_4.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_4.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_4.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_5.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_5.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_5.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_5.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_6.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_6.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_6.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_6.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_7.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_7.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_7.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_7.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_8.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_8.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_8.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_8.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_9.cddl b/rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_9.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/invalid_rfc8610_sample_9.cddl rename to rust/cbork-cddl-parser/tests/cddl/invalid_rfc8610_sample_9.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_arrays.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_arrays.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_arrays.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_arrays.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_bits.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_bits.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_bits.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_bits.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_ord.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_ord.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_ord.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_ord.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_regexp.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_regexp.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_regexp.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_regexp.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_size.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_size.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_size.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_size.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_within_and.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_within_and.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ctrl_within_and.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ctrl_within_and.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_1.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_1.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_1.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_1.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_2.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_2.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_2.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_2.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_3.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_3.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_3.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_cuts_in_maps_alt_3.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_array_object.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_array_object.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_array_object.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_array_object.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_nested_object.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_nested_object.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_nested_object.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_nested_object.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_nested_object_compact.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_nested_object_compact.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_example_nested_object_compact.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_example_nested_object_compact.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_generics.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_generics.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_generics.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_generics.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_group_to_choice.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_group_to_choice.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_group_to_choice.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_group_to_choice.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_non_deterministic_order.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_non_deterministic_order.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_non_deterministic_order.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_non_deterministic_order.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_occurence.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_occurence.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_occurence.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_occurence.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_op_precedence.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_op_precedence.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_op_precedence.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_op_precedence.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ranges.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ranges.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_ranges.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_ranges.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_represenation_types.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_represenation_types.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_represenation_types.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_represenation_types.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_reputon_compact.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_reputon_compact.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_reputon_compact.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_reputon_compact.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_reputon_full.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_reputon_full.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_reputon_full.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_reputon_full.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_1.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_1.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_1.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_1.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_2.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_2.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_2.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_2.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_3.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_3.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_3.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_3.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_4.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_4.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_4.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_4.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_5.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_5.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_5.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_5.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_6.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_6.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_6.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_6.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_7.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_7.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_7.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_7.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_8.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_8.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_8.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_8.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_9.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_9.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_simple_9.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_simple_9.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_socket_plug.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_socket_plug.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_socket_plug.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_socket_plug.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_socket_plug_ext.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_socket_plug_ext.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_socket_plug_ext.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_socket_plug_ext.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_structs.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_structs.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_structs.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_structs.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_structs_alt.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_structs_alt.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_structs_alt.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_structs_alt.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_tables.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_tables.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_tables.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_tables.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_tags.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_tags.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_tags.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_tags.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_unwrapping.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_unwrapping.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_unwrapping.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_unwrapping.cddl diff --git a/rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_unwrapping_alt.cddl b/rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_unwrapping_alt.cddl similarity index 100% rename from rust/cbork/cddl-parser/tests/cddl/valid_rfc8610_unwrapping_alt.cddl rename to rust/cbork-cddl-parser/tests/cddl/valid_rfc8610_unwrapping_alt.cddl diff --git a/rust/cbork/cddl-parser/tests/character_sets.rs b/rust/cbork-cddl-parser/tests/character_sets.rs similarity index 99% rename from rust/cbork/cddl-parser/tests/character_sets.rs rename to rust/cbork-cddl-parser/tests/character_sets.rs index 77b4682ec..46a3e2424 100644 --- a/rust/cbork/cddl-parser/tests/character_sets.rs +++ b/rust/cbork-cddl-parser/tests/character_sets.rs @@ -1,6 +1,6 @@ // cspell: words PCHAR pchar BCHAR bchar SESC sesc SCHAR schar fffd fffe -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork/cddl-parser/tests/comments.rs b/rust/cbork-cddl-parser/tests/comments.rs similarity index 91% rename from rust/cbork/cddl-parser/tests/comments.rs rename to rust/cbork-cddl-parser/tests/comments.rs index f819072ab..435ab3633 100644 --- a/rust/cbork/cddl-parser/tests/comments.rs +++ b/rust/cbork-cddl-parser/tests/comments.rs @@ -1,4 +1,4 @@ -use cddl_parser::{self, cddl_test::Rule}; +use cbork_cddl_parser::{self, cddl_test::Rule}; mod common; use common::comments::*; diff --git a/rust/cbork/cddl-parser/tests/common/byte_sequences.rs b/rust/cbork-cddl-parser/tests/common/byte_sequences.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/byte_sequences.rs rename to rust/cbork-cddl-parser/tests/common/byte_sequences.rs diff --git a/rust/cbork/cddl-parser/tests/common/comments.rs b/rust/cbork-cddl-parser/tests/common/comments.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/comments.rs rename to rust/cbork-cddl-parser/tests/common/comments.rs diff --git a/rust/cbork/cddl-parser/tests/common/group_elements.rs b/rust/cbork-cddl-parser/tests/common/group_elements.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/group_elements.rs rename to rust/cbork-cddl-parser/tests/common/group_elements.rs diff --git a/rust/cbork/cddl-parser/tests/common/identifiers.rs b/rust/cbork-cddl-parser/tests/common/identifiers.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/identifiers.rs rename to rust/cbork-cddl-parser/tests/common/identifiers.rs diff --git a/rust/cbork/cddl-parser/tests/common/literal_values.rs b/rust/cbork-cddl-parser/tests/common/literal_values.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/literal_values.rs rename to rust/cbork-cddl-parser/tests/common/literal_values.rs diff --git a/rust/cbork/cddl-parser/tests/common/mod.rs b/rust/cbork-cddl-parser/tests/common/mod.rs similarity index 96% rename from rust/cbork/cddl-parser/tests/common/mod.rs rename to rust/cbork-cddl-parser/tests/common/mod.rs index fd6dbb23e..107a95527 100644 --- a/rust/cbork/cddl-parser/tests/common/mod.rs +++ b/rust/cbork-cddl-parser/tests/common/mod.rs @@ -1,4 +1,4 @@ -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork/cddl-parser/tests/common/rules.rs b/rust/cbork-cddl-parser/tests/common/rules.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/rules.rs rename to rust/cbork-cddl-parser/tests/common/rules.rs diff --git a/rust/cbork/cddl-parser/tests/common/text_sequences.rs b/rust/cbork-cddl-parser/tests/common/text_sequences.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/text_sequences.rs rename to rust/cbork-cddl-parser/tests/common/text_sequences.rs diff --git a/rust/cbork/cddl-parser/tests/common/type_declarations.rs b/rust/cbork-cddl-parser/tests/common/type_declarations.rs similarity index 100% rename from rust/cbork/cddl-parser/tests/common/type_declarations.rs rename to rust/cbork-cddl-parser/tests/common/type_declarations.rs diff --git a/rust/cbork/cddl-parser/tests/group_elements.rs b/rust/cbork-cddl-parser/tests/group_elements.rs similarity index 97% rename from rust/cbork/cddl-parser/tests/group_elements.rs rename to rust/cbork-cddl-parser/tests/group_elements.rs index 0fa4296de..e735ad1a2 100644 --- a/rust/cbork/cddl-parser/tests/group_elements.rs +++ b/rust/cbork-cddl-parser/tests/group_elements.rs @@ -1,7 +1,7 @@ // cspell: words OPTCOM MEMBERKEY bareword tstr GRPENT GRPCHOICE // cspell: words optcom memberkey grpent grpchoice -use cddl_parser::{self, cddl_test::Rule}; +use cbork_cddl_parser::{self, cddl_test::Rule}; mod common; use common::{group_elements::*, identifiers::*}; diff --git a/rust/cbork/cddl-parser/tests/identifiers.rs b/rust/cbork-cddl-parser/tests/identifiers.rs similarity index 97% rename from rust/cbork/cddl-parser/tests/identifiers.rs rename to rust/cbork-cddl-parser/tests/identifiers.rs index c4f3e7dfa..63a0c80f0 100644 --- a/rust/cbork/cddl-parser/tests/identifiers.rs +++ b/rust/cbork-cddl-parser/tests/identifiers.rs @@ -1,6 +1,6 @@ // cspell: words aname groupsocket typesocket groupsocket -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork/cddl-parser/tests/literal_values.rs b/rust/cbork-cddl-parser/tests/literal_values.rs similarity index 96% rename from rust/cbork/cddl-parser/tests/literal_values.rs rename to rust/cbork-cddl-parser/tests/literal_values.rs index c29fcedeb..727dc7fd3 100644 --- a/rust/cbork/cddl-parser/tests/literal_values.rs +++ b/rust/cbork-cddl-parser/tests/literal_values.rs @@ -2,7 +2,7 @@ use std::ops::Deref; -use cddl_parser::{self, cddl_test::Rule}; +use cbork_cddl_parser::{self, cddl_test::Rule}; mod common; use common::{byte_sequences::*, literal_values::*, text_sequences::*}; diff --git a/rust/cbork/cddl-parser/tests/rules.rs b/rust/cbork-cddl-parser/tests/rules.rs similarity index 99% rename from rust/cbork/cddl-parser/tests/rules.rs rename to rust/cbork-cddl-parser/tests/rules.rs index 79a999e63..b33b9239e 100644 --- a/rust/cbork/cddl-parser/tests/rules.rs +++ b/rust/cbork-cddl-parser/tests/rules.rs @@ -1,7 +1,7 @@ // cspell: words GENERICARG bigfloat ASSIGNG GROUPNAME tstr genericarg GENERICARG // cspell: words assigng assignt ASSIGNT GENERICPARM genericparm -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork/cddl-parser/tests/text_sequences.rs b/rust/cbork-cddl-parser/tests/text_sequences.rs similarity index 89% rename from rust/cbork/cddl-parser/tests/text_sequences.rs rename to rust/cbork-cddl-parser/tests/text_sequences.rs index bd96aa657..4c5270489 100644 --- a/rust/cbork/cddl-parser/tests/text_sequences.rs +++ b/rust/cbork-cddl-parser/tests/text_sequences.rs @@ -1,4 +1,4 @@ -use cddl_parser::{self, cddl_test::Rule}; +use cbork_cddl_parser::{self, cddl_test::Rule}; mod common; use common::text_sequences::*; diff --git a/rust/cbork/cddl-parser/tests/type_declarations.rs b/rust/cbork-cddl-parser/tests/type_declarations.rs similarity index 99% rename from rust/cbork/cddl-parser/tests/type_declarations.rs rename to rust/cbork-cddl-parser/tests/type_declarations.rs index 571b95621..14f024e14 100644 --- a/rust/cbork/cddl-parser/tests/type_declarations.rs +++ b/rust/cbork-cddl-parser/tests/type_declarations.rs @@ -1,7 +1,7 @@ // cspell: words CTLOP aname groupsocket typesocket RANGEOP tstr ctlop // cspell: words rangeop RANGEOP -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork/.cargo/config.toml b/rust/cbork/.cargo/config.toml deleted file mode 100644 index 2764f1df4..000000000 --- a/rust/cbork/.cargo/config.toml +++ /dev/null @@ -1,93 +0,0 @@ -# Use MOLD linker where possible, but ONLY in CI applicable targets. - -# Configure how Docker container targets build. - -# If you want to customize these targets for a local build, then customize them in your: -# $CARGO_HOME/config.toml -# NOT in the project itself. -# These targets are ONLY the targets used by CI and inside docker builds. - -# DO NOT remove `"-C", "target-feature=+crt-static"` from the rustflags for these targets. - -# Should be the default to have fully static rust programs in CI -[target.x86_64-unknown-linux-musl] -linker = "clang" -rustflags = [ - "-C", "link-arg=-fuse-ld=/usr/bin/mold", - "-C", "target-feature=-crt-static" -] - -# Should be the default to have fully static rust programs in CI -[target.aarch64-unknown-linux-musl] -linker = "clang" -rustflags = [ - "-C", "link-arg=-fuse-ld=/usr/bin/mold", - "-C", "target-feature=-crt-static" -] - -[build] -rustflags = [] -rustdocflags = [ - "--enable-index-page", - "-Z", - "unstable-options", -] - -[profile.dev] -opt-level = 1 -debug = true -debug-assertions = true -overflow-checks = true -lto = false -panic = "unwind" -incremental = true -codegen-units = 256 - -[profile.release] -opt-level = 3 -debug = false -debug-assertions = false -overflow-checks = false -lto = "thin" -panic = "unwind" -incremental = false -codegen-units = 16 - -[profile.test] -opt-level = 3 -debug = true -lto = false -debug-assertions = true -incremental = true -codegen-units = 256 - -[profile.bench] -opt-level = 3 -debug = false -debug-assertions = false -overflow-checks = false -lto = "thin" -incremental = false -codegen-units = 16 - -[alias] -lint = "clippy --all-targets" -lintfix = "clippy --all-targets --fix --allow-dirty" -lint-vscode = "clippy --message-format=json-diagnostic-rendered-ansi --all-targets" - -docs = "doc --release --no-deps --document-private-items --bins --lib --examples" -# nightly docs build broken... when they are'nt we can enable these docs... --unit-graph --timings=html,json -Z unstable-options" -testunit = "nextest run --release --bins --lib --tests --benches --no-fail-fast -P ci" -testcov = "llvm-cov nextest --release --bins --lib --tests --benches --no-fail-fast -P ci" -testdocs = "test --doc --release" - -# Rust formatting, MUST be run with +nightly -fmtchk = "fmt -- --check -v --color=always" -fmtfix = "fmt -- -v" - -[term] -quiet = false # whether cargo output is quiet -verbose = false # whether cargo provides verbose output -color = "auto" # whether cargo colorizes output use `CARGO_TERM_COLOR="off"` to disable. -progress.when = "never" # whether cargo shows progress bar -progress.width = 80 # width of progress bar \ No newline at end of file diff --git a/rust/cbork/.config/nextest.toml b/rust/cbork/.config/nextest.toml deleted file mode 100644 index 726524896..000000000 --- a/rust/cbork/.config/nextest.toml +++ /dev/null @@ -1,48 +0,0 @@ -[store] -# The directory under the workspace root at which nextest-related files are -# written. Profile-specific storage is currently written to dir/. -# dir = "target/nextest" - -[profile.default] -# Print out output for failing tests as soon as they fail, and also at the end -# of the run (for easy scrollability). -failure-output = "immediate-final" - -# Do not cancel the test run on the first failure. -fail-fast = true - -status-level = "all" -final-status-level = "all" - -[profile.ci] -# Print out output for failing tests as soon as they fail, and also at the end -# of the run (for easy scrollability). -failure-output = "immediate-final" -# Do not cancel the test run on the first failure. -fail-fast = false - -status-level = "all" -final-status-level = "all" - - -[profile.ci.junit] -# Output a JUnit report into the given file inside 'store.dir/'. -# If unspecified, JUnit is not written out. - -path = "junit.xml" - -# The name of the top-level "report" element in JUnit report. If aggregating -# reports across different test runs, it may be useful to provide separate names -# for each report. -report-name = "nextest" - -# Whether standard output and standard error for passing tests should be stored in the JUnit report. -# Output is stored in the and elements of the element. -store-success-output = true - -# Whether standard output and standard error for failing tests should be stored in the JUnit report. -# Output is stored in the and elements of the element. -# -# Note that if a description can be extracted from the output, it is always stored in the -# element. -store-failure-output = true diff --git a/rust/cbork/Cargo.toml b/rust/cbork/Cargo.toml index d1d9fbf79..9827d5a6c 100644 --- a/rust/cbork/Cargo.toml +++ b/rust/cbork/Cargo.toml @@ -1,47 +1,24 @@ -[workspace] -package.edition = "2021" -package.license = "MIT OR Apache-2.0" -resolver = "2" -members = [ - "cddl-parser", - "abnf-parser", - "cddl-linter", -] +[package] +name = "cbork" +version = "0.0.1" +edition.workspace = true +license.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true -[workspace.lints.rust] -warnings = "deny" -missing_docs = "deny" -let_underscore_drop = "deny" -non_ascii_idents = "deny" -single_use_lifetimes = "deny" -trivial_casts = "deny" -trivial_numeric_casts = "deny" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[workspace.lints.rustdoc] -broken_intra_doc_links = "deny" -invalid_codeblock_attributes = "deny" -invalid_html_tags = "deny" -invalid_rust_codeblocks = "deny" -bare_urls = "deny" -unescaped_backticks = "deny" +[lints] +workspace = true -[workspace.lints.clippy] -pedantic = { level = "deny", priority = -1 } -unwrap_used = "deny" -expect_used = "deny" -todo = "deny" -unimplemented = "deny" -exit = "deny" -get_unwrap = "deny" -index_refutable_slice = "deny" -indexing_slicing = "deny" -match_on_vec_items = "deny" -match_wild_err_arm = "deny" -missing_panics_doc = "deny" -panic = "deny" -string_slice = "deny" -unchecked_duration_subtraction = "deny" -unreachable = "deny" -missing_docs_in_private_items = "deny" +[dependencies] +# Always used a versioned dependency, so that changes to dependent libraries do not cause cascading +# breakage inside the repo. +cbork-cddl-parser = {version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.1" } +# Only use this for testing - do not change dependency to this in checked in code. +#cbork-cddl-parser = { path = "../cbork-cddl-parser", version = "0.1.0" } +clap = { version = "4.5.3", features = ["derive", "env"] } +anyhow = "1.0.71" +console = "0.15.8" -[workspace.dependencies] diff --git a/rust/cbork/Earthfile b/rust/cbork/Earthfile index 05818aa64..334c9d390 100644 --- a/rust/cbork/Earthfile +++ b/rust/cbork/Earthfile @@ -1,48 +1,15 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.1.24 AS rust-ci -# Use when debugging cat-ci locally. -# IMPORT ../../catalyst-ci/earthly/rust AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.00 AS rust-ci -# Set up our target toolchains, and copy our files. -builder: - DO rust-ci+SETUP - - COPY --dir .cargo .config cddl-parser abnf-parser cddl-linter . - COPY Cargo.toml clippy.toml deny.toml rustfmt.toml . - - # RUN cargo generate-lockfile - -## ----------------------------------------------------------------------------- -## -## Standard CI targets. -## -## These targets are discovered and executed automatically by CI. - -# Run check using the most efficient host tooling -# CI Automated Entry point. -check: - FROM +builder - - DO rust-ci+EXECUTE --cmd="/scripts/std_checks.py" - -# Test which runs check with all supported host tooling. Needs qemu or rosetta to run. -# Only used to validate tooling is working across host toolsets. -all-hosts-check: - BUILD --platform=linux/amd64 --platform=linux/arm64 +check +IMPORT .. AS rust-local # Run build using the most efficient host tooling # CI Automated Entry point. build: - FROM +builder - - DO rust-ci+EXECUTE \ - --cmd="/scripts/std_build.py" \ - --args1="--libs=cddl-parser,abnf-parser" \ - --output="release/[^\./]+" \ - --docs="true" + FROM rust-local+build - SAVE ARTIFACT target/$TARGETARCH/doc doc + SAVE ARTIFACT target/release/cbork cbork # Test which runs check with all supported host tooling. Needs qemu or rosetta to run. # Only used to validate tooling is working across host toolsets. diff --git a/rust/cbork/README.md b/rust/cbork/README.md index 74e4e83f4..6bb13ab7d 100644 --- a/rust/cbork/README.md +++ b/rust/cbork/README.md @@ -1,20 +1,65 @@ -# cbork +# CBOR Kit (`cbork`) -CBOR Kit +This is a CLI tool for operating with CDDL and CBOR. -We need to support the parsing of CDDL in the following priority sequence. -Each needs to be complete before extending with the subsequent specification extension. -We do not need to handle choosing which extensions are enabled. +It will grow over time to provide a number of features, and will be supported by individual `cbork-*` crates. -1. CDDL Spec: -2. Errata to include: -3. Extensions: -4. Modules: and +## Install -There are semantic rules about well formed CDDL files that are not enforced by the grammar. -The full parser will also need to validate those rules. -The primary rule is that the very first definition in the file is the base type. +To install this tool run -We should also be able to detect if there are orphaned definitions in the CDDL file. +```shell +cargo install --git https://github.com/input-output-hk/catalyst-libs.git cbork +``` -There may be other checks we need to perform on the parsed AST for validity. +## Features + +### CDDL linter + +[CDDL](#cddl-specifications) (Concise Data Definition Language) +linting CLI tool. +Enables users to check their CDDL code for errors, inconsistencies, and compliance with the CDDL specification. + +#### Currently supports + +* [CDDL][1] +* [CDDL Errata][2] +* [CDDL Extensions][3] + +#### Planned support for + +* [CDDL Modules][4] +* [CDDL Module Standard Library][5] + +## Planned Future Tools within the CLI + +* [ ] A tool to generate a Rust module to decode/encode/validate Data efficiently from a [CDDL](#cddl-specifications) definition. +* [ ] A tool to simply validate [CBOR][6] binary data against a [CDDL](#cddl-specifications) definition. + +## Notes + +There are semantic rules about well-formed [CDDL](#cddl-specifications) files that are not enforced by the grammar. +The full parser does not support these rules currently, but is planned to be extended to validate +those rules in future + +The primary rule that is not currently enforced is that the very first definition in the file is the base type. +We also cannot detect orphaned or missing definitions. + +Both of these are planned for a future release of the tool. + +There may be other checks needed to be performed on the parsed AST for validity. + +## CDDL Specifications + +* [RFC8610][1] +* [RFC8610 Errata][2] +* [RFC9165 CDDL Extensions][3] +* [CDDL Modules][4] +* [CDDL Modules Reference][5] + +[1]: https://www.rfc-editor.org/rfc/rfc8610 "RFC-8610" +[2]: https://www.ietf.org/archive/id/draft-ietf-cbor-update-8610-grammar-01.html "RFC-8610 Errata" +[3]: https://www.rfc-editor.org/rfc/rfc9165 "RFC-9165 CDDL Extensions" +[4]: https://cbor-wg.github.io/cddl-modules/draft-ietf-cbor-cddl-modules.html "CDDL Modules Specification" +[5]: https://github.com/cabo/cddlc "CDDL Modules Standard Library" +[6]: https://datatracker.ietf.org/doc/html/rfc8949 "RFC-8949 CBOR Data Interchange Format" diff --git a/rust/cbork/cddl-linter/Cargo.toml b/rust/cbork/cddl-linter/Cargo.toml deleted file mode 100644 index c2f32ed86..000000000 --- a/rust/cbork/cddl-linter/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "cddl-linter" -version = "0.1.0" -edition.workspace = true -license.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lints] -workspace = true - -[dependencies] -cddl-parser = { path = "../cddl-parser", version = "0.1.0" } -clap = { version = "4.5.3", features = ["derive", "env"] } -anyhow = "1.0.71" -console = "0.15.8" - diff --git a/rust/cbork/cddl-linter/README.md b/rust/cbork/cddl-linter/README.md deleted file mode 100644 index eb27338c7..000000000 --- a/rust/cbork/cddl-linter/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# CDDL linter - -[CDDL](https://datatracker.ietf.org/doc/html/rfc8610) (Concise Data Definition Language) -linting cli tool, -enabling users to check their CDDL code for errors, inconsistencies, and compliance with the CDDL specification. - -## Install - -To install this tool run - -```shell -cargo install --git https://github.com/input-output-hk/catalyst-libs.git cddl-linter -``` diff --git a/rust/cbork/cddl-linter/src/errors.rs b/rust/cbork/cddl-linter/src/errors.rs deleted file mode 100644 index f3cf795cb..000000000 --- a/rust/cbork/cddl-linter/src/errors.rs +++ /dev/null @@ -1,90 +0,0 @@ -//! Errors module. - -#![allow(dead_code)] - -use std::{error::Error, fmt::Display}; - -/// Errors struct which holds a collection of errors -#[derive(Debug)] -pub(crate) struct Errors(Vec); - -impl Error for Errors {} - -impl Display for Errors { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - for err in &self.0 { - write!(f, "- ")?; - let err_str = err.to_string(); - let mut err_lines = err_str.lines(); - if let Some(first_line) = err_lines.next() { - writeln!(f, "{first_line}")?; - for line in err_lines { - writeln!(f, " {line}")?; - } - } - } - Ok(()) - } -} - -impl Errors { - /// Create a new empty `Errors` - pub(crate) fn new() -> Self { - Self(Vec::new()) - } - - /// Returns `true` if the `Errors` contains no elements. - pub(crate) fn is_empty(&self) -> bool { - self.0.is_empty() - } - - /// Add an error to the `Errors` - pub(crate) fn add_err(&mut self, err: E) - where E: Into { - let err = err.into(); - match err.downcast::() { - Ok(errs) => self.0.extend(errs.0), - Err(err) => self.0.push(err), - } - } - - /// Return a closure that adds an error to the `Errors` - pub(crate) fn get_add_err_fn(&mut self) -> impl FnOnce(E) + '_ - where E: Into { - |err| self.add_err(err) - } - - /// Return errors if `Errors` is not empty or return `Ok(val)` - pub(crate) fn return_result(self, val: T) -> anyhow::Result { - if self.0.is_empty() { - Ok(val) - } else { - Err(self.into()) - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_errors() { - let mut errors_1 = Errors::new(); - errors_1.add_err(anyhow::anyhow!("error 1")); - errors_1.add_err(anyhow::anyhow!("error 2")); - - let mut errors_2 = Errors::new(); - errors_2.add_err(anyhow::anyhow!("error 3")); - errors_2.add_err(anyhow::anyhow!("error 4")); - - let mut combined_errors = Errors::new(); - combined_errors.add_err(errors_1); - combined_errors.add_err(errors_2); - - assert_eq!( - combined_errors.to_string(), - "- error 1\n- error 2\n- error 3\n- error 4\n" - ); - } -} diff --git a/rust/cbork/clippy.toml b/rust/cbork/clippy.toml deleted file mode 100644 index 72db4f0ab..000000000 --- a/rust/cbork/clippy.toml +++ /dev/null @@ -1,2 +0,0 @@ -allow-unwrap-in-tests = true -allow-expect-in-tests = true \ No newline at end of file diff --git a/rust/cbork/deny.toml b/rust/cbork/deny.toml deleted file mode 100644 index 99a717f14..000000000 --- a/rust/cbork/deny.toml +++ /dev/null @@ -1,79 +0,0 @@ -[graph] - -targets = [ - "x86_64-unknown-linux-gnu", - "aarch64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "aarch64-apple-darwin", - "x86_64-apple-darwin", - "x86_64-pc-windows-msvc", - "wasm32-unknown-unknown", - "wasm32-wasip1", - "wasm32-wasip2", -] - -[advisories] -version = 2 -ignore = [ - { id = "RUSTSEC-2020-0168", reason = "`mach` is used by wasmtime and we have no control over that." }, - { id = "RUSTSEC-2021-0145", reason = "we don't target windows, and don;t use a custom global allocator." }, -] - -[bans] -multiple-versions = "warn" -wildcards = 'deny' -deny = [ - { crate = "openssl", use-instead = "rustls" }, - { crate = "openssl-sys", use-instead = "rustls" }, - "libssh2-sys", -] -skip = [] -skip-tree = [ - { crate = "windows-sys@0.48.0", reason = "a foundational crate for many that bumps far too frequently to ever have a shared version" }, -] - -[sources] -unknown-registry = "deny" -unknown-git = "deny" - -# List of URLs for allowed Git repositories -allow-git = [ - "https://github.com/input-output-hk/hermes.git", - "https://github.com/input-output-hk/catalyst-pallas.git", - "https://github.com/bytecodealliance/wasmtime", - "https://github.com/aldanor/hdf5-rust", -] - -[licenses] -version = 2 -unused-allowed-license = "allow" -confidence-threshold = 0.93 -allow = [ - "MIT", - "Apache-2.0", - "Unicode-DFS-2016", - "BSD-3-Clause", - "BSD-2-Clause", - "BlueOak-1.0.0", - "Apache-2.0 WITH LLVM-exception", - "CC0-1.0", - "ISC", - "Unicode-3.0", - "MPL-2.0", -] -exceptions = [] - -[[licenses.clarify]] -crate = "byte-array-literals" -expression = "Apache-2.0 WITH LLVM-exception" -license-files = [{ path = "../../../LICENSE", hash = 0x001c7e6c }] - -[[licenses.clarify]] -crate = "hdf5-src" -expression = "MIT" -license-files = [{ path = "../LICENSE-MIT", hash = 0x001c7e6c }] - -[[licenses.clarify]] -crate = "ring" -expression = "MIT" -license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] diff --git a/rust/cbork/rust-toolchain.toml b/rust/cbork/rust-toolchain.toml deleted file mode 100644 index 08feed89d..000000000 --- a/rust/cbork/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.78" -profile = "default" \ No newline at end of file diff --git a/rust/cbork/rustfmt.toml b/rust/cbork/rustfmt.toml deleted file mode 100644 index 1a0573b22..000000000 --- a/rust/cbork/rustfmt.toml +++ /dev/null @@ -1,68 +0,0 @@ -# Enable unstable features: -# * imports_indent -# * imports_layout -# * imports_granularity -# * group_imports -# * reorder_impl_items -# * trailing_comma -# * where_single_line -# * wrap_comments -# * comment_width -# * blank_lines_upper_bound -# * condense_wildcard_suffixes -# * force_multiline_blocks -# * format_code_in_doc_comments -# * format_generated_files -# * hex_literal_case -# * inline_attribute_width -# * normalize_comments -# * normalize_doc_attributes -# * overflow_delimited_expr -unstable_features = true - -# Compatibility: -edition = "2021" - -# Tabs & spaces - Defaults, listed for clarity -tab_spaces = 4 -hard_tabs = false - -# Commas. -trailing_comma = "Vertical" -match_block_trailing_comma = true - -# General width constraints. -max_width = 100 - -# Comments: -normalize_comments = true -normalize_doc_attributes = true -wrap_comments = true -comment_width = 90 # small excess is okay but prefer 80 -format_code_in_doc_comments = true -format_generated_files = false - -# Imports. -imports_indent = "Block" -imports_layout = "Mixed" -group_imports = "StdExternalCrate" -reorder_imports = true -imports_granularity = "Crate" - -# Arguments: -use_small_heuristics = "Default" -fn_params_layout = "Compressed" -overflow_delimited_expr = true -where_single_line = true - -# Misc: -inline_attribute_width = 0 -blank_lines_upper_bound = 1 -reorder_impl_items = true -use_field_init_shorthand = true -force_multiline_blocks = true -condense_wildcard_suffixes = true -hex_literal_case = "Upper" - -# Ignored files: -ignore = [] \ No newline at end of file diff --git a/rust/cbork/cddl-linter/src/cli.rs b/rust/cbork/src/cli.rs similarity index 95% rename from rust/cbork/cddl-linter/src/cli.rs rename to rust/cbork/src/cli.rs index bc7f81dd4..b29200889 100644 --- a/rust/cbork/cddl-linter/src/cli.rs +++ b/rust/cbork/src/cli.rs @@ -2,6 +2,7 @@ use std::{path::PathBuf, process::exit}; +use cbork_cddl_parser::{parse_cddl, Extension}; use clap::Parser; use console::{style, Emoji}; @@ -32,7 +33,7 @@ impl Cli { /// Check the CDDL file, return any errors fn check_file(file_path: &PathBuf) -> anyhow::Result<()> { let mut content = std::fs::read_to_string(file_path)?; - cddl_parser::parse_cddl(&mut content, &cddl_parser::Extension::CDDLParser)?; + parse_cddl(&mut content, &Extension::CDDLParser)?; Ok(()) } diff --git a/rust/cbork/cddl-linter/src/main.rs b/rust/cbork/src/main.rs similarity index 100% rename from rust/cbork/cddl-linter/src/main.rs rename to rust/cbork/src/main.rs diff --git a/rust/clippy.toml b/rust/clippy.toml index 6933b8164..0358cdb50 100644 --- a/rust/clippy.toml +++ b/rust/clippy.toml @@ -1 +1,2 @@ +allow-unwrap-in-tests = true allow-expect-in-tests = true diff --git a/rust/deny.toml b/rust/deny.toml index 4c332c180..51e0930bb 100644 --- a/rust/deny.toml +++ b/rust/deny.toml @@ -15,7 +15,7 @@ targets = [ version = 2 ignore = [ { id = "RUSTSEC-2020-0168", reason = "`mach` is used by wasmtime and we have no control over that." }, - { id = "RUSTSEC-2021-0145", reason = "we don't target windows, and don;t use a custom global allocator." }, + { id = "RUSTSEC-2021-0145", reason = "we don't target windows, and don't use a custom global allocator." }, ] [bans] @@ -36,7 +36,7 @@ unknown-registry = "deny" unknown-git = "deny" allow-git = [ - "https://github.com/input-output-hk/hermes.git", + "https://github.com/input-output-hk/catalyst-libs.git", "https://github.com/input-output-hk/catalyst-pallas.git", "https://github.com/bytecodealliance/wasmtime", "https://github.com/aldanor/hdf5-rust", diff --git a/rust/hermes-ipfs/Cargo.toml b/rust/hermes-ipfs/Cargo.toml index c3b09f7e1..141da4adb 100644 --- a/rust/hermes-ipfs/Cargo.toml +++ b/rust/hermes-ipfs/Cargo.toml @@ -1,27 +1,27 @@ [package] name = "hermes-ipfs" +version = "0.0.1" edition.workspace = true -version.workspace = true +license.workspace = true authors.workspace = true homepage.workspace = true repository.workspace = true -license.workspace = true [lints] workspace = true [dependencies] -anyhow.workspace = true -derive_more.workspace = true -libipld.workspace = true -rust-ipfs.workspace = true -tokio.workspace = true +anyhow = "1.0.71" +derive_more = {version = "1.0.0", features = ["from","into","display"] } +libipld = "0.16.0" +rust-ipfs = "0.11.21" +tokio = "1.36.0" [dev-dependencies] # Dependencies used by examples -clap = { workspace = true, features = ["derive"] } -dirs.workspace = true -lipsum.workspace = true -rand.workspace = true -rustyline-async.workspace = true -tracing-subscriber.workspace = true +clap = { version = "4.5.3", features = ["derive"] } +dirs = "5.0.1" +lipsum = "0.9.1" +rand = "0.8.5" +rustyline-async = "0.4.2" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/rust/hermes-ipfs/src/lib.rs b/rust/hermes-ipfs/src/lib.rs index 40a90bfa9..6b2b41e78 100644 --- a/rust/hermes-ipfs/src/lib.rs +++ b/rust/hermes-ipfs/src/lib.rs @@ -212,8 +212,8 @@ impl HermesIpfs { /// List all pins in the IPFS node. /// /// ## Parameters - /// * `cid` - `Option` Optional content identifier to list pins. - /// If `None`, lists all pins. + /// * `cid` - `Option` Optional content identifier to list pins. If `None`, lists + /// all pins. /// /// ## Errors /// Returns an error if listing pins fails. diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml index f0ad0a7e0..ff6c11e3f 100644 --- a/rust/rust-toolchain.toml +++ b/rust/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.78" +channel = "1.80" profile = "default" targets = ["x86_64-unknown-linux-musl"]