ClearScript
ClearScript copied to clipboard
Android Support?
Is there a plan to support Android Mono? Is it possible and feasible?
I see this was discussed in #57 but ClearScript does not use mixed assemblies anymore so I wanted to ask again.
Hi @KurtGokhan,
We have no mobile plans for ClearScript at the moment. As you probably know, ClearScript is a side project, and supporting the three major desktop platforms – including the eight platform-specific V8 packages – is already stretching the limits of the resources available.
As for whether it's feasible, we're not aware of any reason why not. ClearScript's managed assemblies already target .NET Standard 2.1, which is supported by Mono and Xamarin. All that remains is the native ClearScriptV8 library, which should be relatively easy to build in an Android NDK environment.
Thanks!
Thank you. I will check if it is something I can do.
Hi @ClearScriptLib So I have checked the source code
And found out this. So now questions are: 1.Is there any perticular reason/dificulties to implement android(as well as ios) support? 2. if I want to folk my own source to make this happen, can you give me any advise, and do you think its doable? 3. do you have any plan in the future to support android(and any other OS)?
Sorry for so many questoins, but I thinks it will be a really cool project if it can support mobile OSes.
Thank you.
Thank you. I will check if it is something I can do.
Hi, do you make any progress regarding android supporting? Can you share any of your thought? Thank you.
@nextfool I succeeded in making ClearScript run on Android. See #290
But there are some caveats.
- It is for 7.1.5.
- If you want to use it, you will need to build it from source.
- I had removed Intl to cut down the binary size and simplify some stuff, but can be enabled with some effort.
- Since there is no way to know if a platform is Android in .NET, I had to improvise a bit.
- The code is written with my opinion and not reviewed by ClearScript team.
Ultimately, that PR is something I prepared for myself so it may not be perfectly suitable for you.
Wouldn't you be able to use System.OperatingSystem.IsAndroidVersionAtLeast(33)
and System.OperatingSystem.IsAndroid
for example? You could use that with say, [SupportedOSPlatform("Android33.0")]
and such decorated methods if you want. Tested and works in net7.0-android for example.