-
Notifications
You must be signed in to change notification settings - Fork 4
[Mega PR] Project Refactoring #3
Conversation
There was a problem hiding this 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.
packages/keystore_ffi/android/src/main/jniLibs/arm64-v8a/libkeystore_ffi.so
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
/Users/shadykhalifa/Code/sunshine-flutter/target/universal/debug/libkeystore_ffi.a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same again
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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/'); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
https://doc.rust-lang.org/cargo/reference/environment-variables.html#dynamic-library-paths
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
packages/keystore_ffi/android/src/main/jniLibs/arm64-v8a/libkeystore_ffi.so
Outdated
Show resolved
Hide resolved
packages/keystore_ffi/android/src/main/jniLibs/armeabi-v7a/libkeystore_ffi.so
Outdated
Show resolved
Hide resolved
packages/keystore_ffi/android/src/main/jniLibs/x86/libkeystore_ffi.so
Outdated
Show resolved
Hide resolved
…_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>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
I did a couple of things that match what I did in
flutterust
.