-
Notifications
You must be signed in to change notification settings - Fork 61
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
How to use jsaddle-clib
#90
Comments
Also I am confused about the relation between the |
The only actual use of |
Hmm, it seems that if one wants to use reflex, then reflex-dom has its own support for creating an Android Activity, that somehow revolves around https://github.com/reflex-frp/reflex-dom/blob/develop/reflex-dom/src-android/Reflex/Dom/Android/MainWidget.hsc and https://github.com/reflex-frp/reflex-dom/blob/1eb43e17c98c1fc67eb21000e2057e3b8488e446/reflex-dom/cbits/MainWidget.c and https://github.com/reflex-frp/reflex-dom/blob/1eb43e17c98c1fc67eb21000e2057e3b8488e446/reflex-dom/java/org/reflexfrp/reflexdom/MainWidget.java and hence does not use the more general purpose Or does it complement it? https://github.com/gonimo/gonimo/blob/master/front-android/app/Android.hs seems to be using both. But I can’t find any indication on how to run my non-reflex jsaddle app properly on android (let alone my sdl application … but that’s off topic for here.) @eskimor, are you watching this space? You seem to be the expert here :-) |
More sleuthing; it seems that https://github.com/reflex-frp/reflex-dom/blob/master/reflex-dom/src-android/Reflex/Dom/Android/MainWidget.hsc isn’t actually tied to reflex. Maybe this could and should be its own package, but isn’t because nobody asked for it? There is a comment
|
Ugh:
so how did |
Despite not using reflex, this seems to line up in terms of types, and is the most promising variant so far:
(where If that works out I guess I’ll have to bug the reflex people to provide that functionality in a separate library… :-) |
Well, (after renaming that to (I’d still be interested in the original question: how to use |
Sorry - I am late on this, but glad you got it to work! I can't really say anything about direct usage of jsaddle-clib unfortunately. Except maybe that I think it is unlikely that it will suffice for running your Application on Android, as this also requires some integration with the Java SDK. You would need to wire it up manually with the Android WebView too. Regarding on how Gonimo did it: I was quite liberal with patching dependencies with features I needed. In particular: https://github.com/eskimor/reflex-dom/blob/5dd733e25fd16ff628560a9bc6583b170f13dacb/reflex-dom/reflex-dom.cabal#L92-L94 Most stuff I needed however, that I did not consider too application specific got merged to master at some point. |
The documentation lists
jsaddle-clib
as one of the runners to choose from. All the other runners seem to export a more or less compatiblerun
function, but notjsaddle-clib
. Some documentation on how to usejsaddle-clib
would be helpful.The text was updated successfully, but these errors were encountered: