Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

[Mega PR] Project Refactoring #3

Merged
merged 6 commits into from
May 6, 2020
Merged

[Mega PR] Project Refactoring #3

merged 6 commits into from
May 6, 2020

Conversation

shekohex
Copy link

@shekohex shekohex commented May 4, 2020

I did a couple of things that match what I did in flutterust.

@shekohex shekohex requested a review from dvc94ch May 4, 2020 22:00
Copy link
Contributor

@4meta5 4meta5 left a comment

Choose a reason for hiding this comment

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

works for me locally so it'd close the open issue #2 and I'm inclined to merge it as is for that reason

@dvc94ch let me know if you have any disagreements, it does restructure the repo to rely on cargo make. It would be nice if you could test android, I have tested ios and it works with this branch.

@@ -0,0 +1 @@
/Users/shadykhalifa/Code/sunshine-flutter/target/universal/debug/libkeystore_ffi.a
Copy link
Collaborator

Choose a reason for hiding this comment

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

same again

Copy link
Author

Choose a reason for hiding this comment

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

same, when you run cargo make it would be overwritten with your local path.

Copy link
Author

Choose a reason for hiding this comment

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

I guess we should add these to .gitignore

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that would make sense.


ffi.DynamicLibrary dynamicLibrary() {
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
return load(basePath: '../../../target/debug/');
Copy link
Collaborator

Choose a reason for hiding this comment

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

mmh, can we avoid hardcoding paths?

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe Makefile.toml can set the env variables?

Copy link
Author

Choose a reason for hiding this comment

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

yeah, I'm trying to find a way to not hard coding.
but the ffi_helper doesn't provide a way to a lib path for platform specifically.
so I had to hard code that, any idea to get workaround that in a better way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

on linux you'd set LD_LIBRARY_PATH in Makefile.toml

Copy link
Contributor

Choose a reason for hiding this comment

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

might have hit this problem which prevents setting env variables rust-lang/cargo#4121

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

please note that this env is going to be on the target platform, not the host.
so I guess it's not gonna work this way!

- asset: assets/fonts/Roboto-Regular.ttf
- family: MaterialIcons
fonts:
- asset: assets/fonts/MaterialIcons-Regular.ttf
Copy link
Collaborator

Choose a reason for hiding this comment

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

are these tabs or spaces?

Copy link
Author

Choose a reason for hiding this comment

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

I have no Idea 😅, I didn't made any changes other than the original file.

Shady Khalifa and others added 3 commits May 5, 2020 19:27
…_ffi.so

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
…ystore_ffi.so

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
…keystore_ffi.so

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Shady Khalifa and others added 2 commits May 6, 2020 17:29
@shekohex shekohex merged commit 3922cf7 into master May 6, 2020
@shekohex shekohex deleted the refactor branch May 6, 2020 15:33
@shekohex shekohex mentioned this pull request May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants