Is is possible to use different language backends other than objc/java?

I see from the documentation there is a Foreign language attribute: [Foreign(Language.x)] will a plugabble API ever be considered or will this be locked down to just objc and java?


Great question!

There has been some recent work on making the Uno compiler extensible with plugins, so it’s possible that this will happen in the future.

What languages did you have in mind? There has been some talk about adding Foreign Swift but it hasn’t been prioritised since Objective-C gets the job done for us so far. Uno also has pretty good interop with C and C++ already through extern code blocks.

I think foreign swift would be a good bet as more and more ios docs will have swift snippets to consume.

In particular I would be interested in any ML varients like F#, Ocaml etc

What components do you envision writing in an ML variant through foreign code?

We’ve so far been using foreign code for interop with native libraries and SDKs which are usually in C, C++, Objective-C (iOS), Swift (iOS), or Java (Android). For this use case I would say our bases are pretty well covered (we’re only missing Swift!).

If you’re looking for a way to write your business logic in an ML-like language, then compiling e.g. F# to JS seems like a natural way to go (as discussed here).

Im just altogether happier with ML varient languages rather then C based thats all :slight_smile: I think swift is the missing piece in terms of the best future gains when new iterations of ios features arrive.

In all likelyhood the backend would be external so it could be whatever has a http interface anyway.

Let me hack something together quick for the F#->js option, I’ll report back soon :slight_smile:

Hear, hear!

A bunch of us here at Fuse are excited at the prospect of writing our apps in a statically typed functional language, so please keep us posted! :slight_smile:

I have started an attempt to get F# to transpile to JavaScript using Fable. The Github repository is here:

What currently works is Observable, typed. Also F# core library works. I have not tested on later than 0.12. I have not succeeded in mapping any of the other libraries.

You get intellisense in Visual Studio, and it works on Mac (VS Code) and on Windows (VS2015). I am not really experienced with this kind of work, so I hit walls in many areas.

If (any of) you decide to take a look at it:

  • src/Fsharp/Program/Program.sln - Open this with VS2015, it has a post build step that transpiles
  • src/App - View this with fuse preview

Note: I’ve changed the src/App/fablecore.js to be module compatible with Fuse.

There are a bunch of issues that need to be fixed, I’ll start adding issues if anyone wants to participate.

Oh nice, Ive just done exactly the same thing :slight_smile:

Looking through these two repos, it seems like F# with Fuse was abandoned 18-24 months ago. Is this a fair conclusion and is this because it doesn’t work, or we concluded bang for buck it wasn’t worth it, or is there a simpler way of integrating now?

The F# support was a community project, and as such it perhaps depends a lot on the author of it. Internally, we don’t have any plans to work on that specifically.

However, what we do have, is a full ES6 support coming (there is an open Beta testing of that), and you might find it quite cool. Hop on our Slack community and you can find out more about it.

Hi Fergus, I wrote about Fable |> Fuse in my blog here: and

I actually also mentioned it at FSharpX in my lightning talk too, and I believe I updated the npm package around that time too for the new version of Fable.

Slides for fsharpX here: