Swift packages

Can I use the ANTLR Swift runtime with Elements on Mac, Windows and Linux on Island?

I had been thinking of using the ANTLR C# runtime but it depends on .NET.

I’m trying to build a command line transpiler and I don’t want it to have any external dependencies. I want it to be a self contained executable and I think that is possible on all three desktop platforms with Swift.

I’m afraid we’re still a bit away from being able to import and use Swift ABI binaries and types — mostly because, as I cant tire of letting people know — Apple is making an utter fracking mess here, none of it is documented (beyond “the compiler is the spec, including any bugs it might have”).

Swift ABI will come back to bite them badly, years down the road, if they continue making it the foundation of their platform. Because its not a clean platform, its a compiler ABI designed by quacks and a committee. :frowning:

Don’t hold back @mh :slight_smile:

No worries - I have other options. I could resort to writing the tool in C# and use ANTLR’s C# runtime library but that requires me to use Dot NET and Mono (which I wanted to avoid). Perhaps I’ll see if I can port the ANTLR C# runtime to RTL instead.

:wink:

I wa sgonna suggest looking at that, yes. Feel free to let me know of you find stuff that would be handy in Elements RTL that isn’t there yet to facilitate porting this (and .NET libs in general)

1 Like