Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adjust permissions to support uniffi module outside the repo #175

Merged
merged 5 commits into from
Sep 8, 2023

Conversation

conanoc
Copy link
Contributor

@conanoc conanoc commented Sep 5, 2023

Please take a look @andrewwhitehead
I could make a uniffi module as a separate crate with these changes. I added some dummy documents in error.rs and store.rs to make them public.

src/kms/entry.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated

pub mod kms;

mod store;
pub mod store;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's in the store module that's not being exposed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the symbols I use from store.
pub use aries_askar::store::{entry, PassKey, Session, Store, StoreKeyMethod};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just use aries_askar::{entry, PassKey, Session, Store, StoreKeyMethod} though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. It works.

Signed-off-by: conanoc <[email protected]>
src/kms/entry.rs Outdated
@@ -65,6 +65,11 @@ impl KeyEntry {
self.name.as_str()
}

/// Accessor for the key tags
pub fn tags_as_ref(&self) -> &Vec<EntryTag> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could return a slice to avoid exposing implementation details: self.tags.as_slice()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@conanoc
Copy link
Contributor Author

conanoc commented Sep 8, 2023

After all, What I need is just adding an accessor for KeyEntry.tags. I didn't know how rust symbols are exported. Thanks for your guide.

@andrewwhitehead andrewwhitehead merged commit 53d7d1c into openwallet-foundation:main Sep 8, 2023
4 checks passed
jamshale pushed a commit to jamshale/aries-askar that referenced this pull request Aug 18, 2024
…let-foundation#175)

* Adjust permissions to support uniffi module outside the repo

Signed-off-by: conanoc <[email protected]>

* respond to comments

Signed-off-by: conanoc <[email protected]>

* hide store, return tags as slice

Signed-off-by: conanoc <[email protected]>

* revert unnecessary changes

Signed-off-by: conanoc <[email protected]>

---------

Signed-off-by: conanoc <[email protected]>
Co-authored-by: Andrew Whitehead <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants