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

Revert the mobile support #55

Open
jeronimo13 opened this issue Feb 5, 2020 · 7 comments
Open

Revert the mobile support #55

jeronimo13 opened this issue Feb 5, 2020 · 7 comments
Labels
help wanted Extra attention is needed kind/feature

Comments

@jeronimo13
Copy link

Hi @techknowlogick
thanks for the awesome fork. We are currently using it and it worked well so far

I have a request regarding mobile support: is there any chance that it will be back soon? If no could you please provide some context on why you decided to remove it?

Thanks in advance!

@kolaente
Copy link
Collaborator

kolaente commented Feb 6, 2020

@jeronimo13 We mostly removed support for mobile to reduce the overall complexity of xgo, as we mainly maintain this fork to use it in Gitea for cross-platform builds, which does not uses mobile builds. If I recall correctly, we updated the underlying base image which in turn created problems with the code for mobile support and thus we decided to drop it (since we're not using it).

Just out of curiosity, what is your use case for mobile?

@techknowlogick
Copy link
Owner

we updated the underlying base image which in turn created problems with the code for mobile support and thus we decided to drop it (since we're not using it).

Yup this is correct. Although we would be open to accepting PRs that add it back in.

@jeronimo13
Copy link
Author

@kolaente @techknowlogick thanks for the quick response!

Just out of curiosity, what is your use case for mobile?

A bit of context:
We need to release a set of SDKs. The request is to have Java, Ruby, Python, Go, TypeScript etc etc.
The nature of our SDK is that it's a bit verbose to write all of them in the native language. Previously, we already had JS and ruby SDK and they quickly started to differ, which is not cool.
There are only HTTP requests inside of SDK, the rest is basically the clever data manipulation. I work for the early-stage startup so hiring 15 programmers is not the right move for us right now

Our solution:
TS is written from scratch.
The rest is basically a Golang SDK, cross-compiled via xgo for win/darwin/Linux and for x86/x64. Then I call native code via JNA(Java) or FFI (ruby/python). The tests are in Azure. It quacks like it's working so I'm happy

Currently, I'm investigating how to cross-compile for Android and iOS, it's a huge market for us. I was able to get a working prototype for Android using https://github.com/karalabe/xgo since it still has mobile support

To the point of PR: my current knowledge in cross-compiling is hardly above zero. But if get a working solution then I would submit a PR since we will open-source our codebase anyway.

@lruggieri
Copy link
Contributor

@techknowlogick @jeronimo13 @kolaente I tried to re-introduce it in this PR
Please it with your code please and let me know if anything is wrong

@liuyibox
Copy link

@kolaente @techknowlogick thanks for the quick response!

Just out of curiosity, what is your use case for mobile?

A bit of context: We need to release a set of SDKs. The request is to have Java, Ruby, Python, Go, TypeScript etc etc. The nature of our SDK is that it's a bit verbose to write all of them in the native language. Previously, we already had JS and ruby SDK and they quickly started to differ, which is not cool. There are only HTTP requests inside of SDK, the rest is basically the clever data manipulation. I work for the early-stage startup so hiring 15 programmers is not the right move for us right now

Our solution: TS is written from scratch. The rest is basically a Golang SDK, cross-compiled via xgo for win/darwin/Linux and for x86/x64. Then I call native code via JNA(Java) or FFI (ruby/python). The tests are in Azure. It quacks like it's working so I'm happy

Currently, I'm investigating how to cross-compile for Android and iOS, it's a huge market for us. I was able to get a working prototype for Android using https://github.com/karalabe/xgo since it still has mobile support

To the point of PR: my current knowledge in cross-compiling is hardly above zero. But if get a working solution then I would submit a PR since we will open-source our codebase anyway.

Hi @jeronimo13 , have you succeeded in cross-compiling for the Android? I'm working on a project that requires cross-compiling go repositories for the Android platform. Please let me know if you have open sourced the cross-compiling tool. Also, I'd like to help with building that tool as I want to learn how to build the cross-compiling tool.

@lruggieri
Copy link
Contributor

@liuyibox have a look here
https://github.com/lruggieri/xgo/tree/feature/mobile

I haven't had time to re-submit a PR, but I was compiling fine for mobile (both android an iOS) with it.

@liuyibox
Copy link

@liuyibox have a look here https://github.com/lruggieri/xgo/tree/feature/mobile

I haven't had time to re-submit a PR, but I was compiling fine for mobile (both android an iOS) with it.

@lruggieri Thanks for your reply. I tried your branch for a while, but it did not work out on my side. I'm not sure how to use your branch correctly. I build a Dockerfile by modifying your Dockerfile in the docker/base folder as shown below. I build a container with it, but I got the following erros when I use this container to cross-compile my go-based repo. How should I debug this or where should I trace this problem?

Screenshot from 2023-11-12 03-09-14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/feature
Projects
None yet
Development

No branches or pull requests

5 participants