Move crates into crates/
and rename plural modules to singular
#1091
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move crates into
crates/
and rename plural modules to singular.Closes #1021 and #1062.
I renamed plurals to singular whenever the containing type was singular but the module was not. For example
Asset
was inassets/mod.rs
, so I renamed it toasset/mod.rs
.However, when the containing type is plural or we have or anticipate multiple types to be contained in a module, I left them as plural. Modules deliberately left as plural:
crates/miden-objects/src/constants.rs
which contains multiple constants.crates/miden-objects/src/transaction/tx_args.rs
which containsTransactionArgs
.crates/miden-objects/src/note/details.rs
which containsNoteDetails
.crates/miden-objects/src/transaction/inputs.rs
which containsInputNotes
,ToInputNoteCommitments
,TransactionInputs
.crates/miden-objects/src/note/inputs.rs
which containsNoteInputs
.crates/miden-objects/src/transaction/outputs.rs
which containsOutputNotes
,TransactionOutputs
.OutputNote
, so it's impossible to satisfy the above criteria here.errors
modules, since they usually contain multiple error types.crates/miden-objects/src/transaction/events.rs
module which contains multiple event constants.crates/miden-objects/src/note/assets.rs
which containsNoteAssets
.crates/miden-tx/src/auth/signatures
which might contain more signatures in the future.crates/miden-lib/asm
intact, because we anticipate to have multiple kernels, account_components, note_scripts, etc. so using plural seems fine. For the same reason the modules incrates/miden-lib/src/account/
were left as-is.Feel free to disagree, though, I don't have a strong opinion on those. This is just the rationale I've followed.