NOTE: This API is not yet guarenteed to be stable or backward-compatible until v1.0, so breaking changes may occur at any time.
Interstellar is an F# library providing a standard, mixed-paradigm API for accessing browser controls on various platforms. Currently, there are 3 combinations platform and browser hosts available. See Examples for a simple sample application. See https://github.com/jwosty/InterstellarFableHelloWorld for an example of combining Interstellar with Fable, achieving a cross-platform desktop app built completely in F#.
You will need the .Net 5 SDK (and the mono SDK on macOS). For the Windows projects, you should be able to use any of the standard IDEs (Visual Studio, Visual Studio Code, Rider [untested but should work]). For the macOS projects, you need to use Visual Studio for Mac.
Create a project from the template:
|
On Windows, you can run it like so:
|
On macOS, I recommend opening <project-name>.macOS.sln
in Visual Studio for Mac and running it that way. It runs using the mono-based Xamarin.macOS runtime, and as a result you currently can't run it with dotnet run
(see xamarin/xamarin-macios#3955). This is on the roadmap for .NET 6. You'll have to use Mono's msbuild
instead, if you want to use the CLI.
You should end up with a simple, cross-platform sample app that opens a window built using embeded HTML, CSS, and Javascript.
By default, this will create a core sample project, and a host project for each platform (Windows and macOS). To generate a project without a macOS host, use the following:
|
And to disable Windows:
|
To see more info about these options:
|