Extending Ambly to Windows and Linux

May 29, 2015

Ambly started its life as an OS X REPL into iOS JavaScriptCore. Shortly after that, React Native was announced, targeting both iOS and Android.

In my opinion React Native combined with libraries like Om provides an extremely compelling way to develop mobile apps using ClojureScript. I’d really like to see this work for both iOS and Android, along with the freedom to develop using OS X, Windows, or whatever OS desired.




Prior to the 0.5.0 release, Ambly only supported OS X. Having said that, Ambly uses standard protocols such as TCP, WebDAV, and mDNS. So it should be possible to port the “REPL-half” of Ambly to other operating systems. In fact, the only portion of Ambly that depends on the OS is where it delegates to the OS to establish a WebDAV mount. For example, it issues mount_webdav on OS X, and it can just as well issue net use on Windows to achieve the same.

Now, Ambly detects that it is running on Windows and switches to using net use. On other operating systems such as Linux, Ambly simply prompts the user to manually mount WebDAV. Here is a demo of Ambly 0.5.0 driving React Native from Windows:

 




 

The cool thing is that Facebook may ultimately go with JavaScriptCore for its JavaScript engine in the Android implementation of React Native. If it does, this may mean that it is relatively easy to port the “device half” of Ambly to Android, thus completing the picture!

Tags: Ambly