RID - Integrate Rust into your Dart or Flutter app simply by annotating it

Interface from Flutter to Rust without writing complex and error prone FFI boilerplate.

Author your application logic in Rust to benefit from its security and speed.

Benefit from Flutter’s hot reload feature while creating the UI of your application.

This just looks very awesome.

Would be nice to have it in Elixir land.

3 Likes

Corresponding tweet for this thread:

Share link for this tweet.

2 Likes

Elixir isn’t really embeddable with no runtime like Rust is though, Rust just compiles to a dynamic library that it then loads directly. You can embed Rust in elixir like that too, Rust makes for great NIF’s!

4 Likes

I want to write dome SDKs for Android and iOs and have use the same code in both and until now my best bet looks like Rust, but I would need to learn it, and the learning curve is very steep for someone not used to compiled languages.

If you know of some good resources to help me out feel free to share.

2 Likes

Yeah elixir is fine as the ‘host’ language, just like flutter is fine as the ‘host’ language, but neither really work as linked in things, like how rust is being used here (and rust is just kind of great at everything).

If you want to use the same code on many many systems like that then you will either be using a native language (like rust, which I recommend, the error messages are utterly fantastic and it has a vast ecosystem now that’s still rapidly growing), or something that compiles down to native code (java or .NET have conversion tools for that but they aren’t very clean, Kotlin is better as it can natively compile to native code but still not as ‘clean’ or usable from other systems).

3 Likes

This is been my idea to, and I am now watching this talk, but by the looks of it I will have a very hard task for someone with a backend background on dynamic languages, but lets see what I will be able to do.

2 Likes

Depends on what type of backend languages. Like you mention elixir, if you’ve messed with gleam then you are already halfway to rust. If you’ve done typescript then you are like 3/4s of the way to rust, etc… And though Rust is huge, I still think it’s a fantastic language to learn in just because of how awesome its error messages are, the documentation ecosystem, etc… :slight_smile:

Can always ask me questions in real time, I’m on IRC and Discord, or ask on these forums so its indexable for others too (feel free to ping me for me to see it faster). :slight_smile:

2 Likes

PHP 5 and 7 whn working as a backend developer.

Elixir is my passion since many years, and I use it on my pet projects, but this is not on a daily bases, but I got a better grasp on it now.

Since I am a Developer Advocate I have touched a lot of them, NodeJS, Python, Ruby, Java, Kotlin, Swift, C#, etc.

The problem is that in all this langs I just wrote Hello world kind of quickstarts at my current work.

Rust was my lang of choice to learn, before I found Elixir, and the few times I tried ot start with it I just gave up due to steep learning curve and docs targetting devs with background in C.

Many thanks for the offer. I will try to remember about it :slight_smile:

2 Likes

If you used PHP7 with types enabled then that helps. :slight_smile:

Kotlin, Swift, and C# definitely gives you a leg up too!

2 Likes

I am a huge fan of types, therefore having to use types isn’t the problem.

I am a self-taught dev, and what I feel I miss is all the background and mindset of compiled languages, memory heap/stack and all that baggage that a dev as when he is used to work with compiled languages.

I have read a lot and watched videos, but things just don’t stay in my memory for long, and once I don’t use compiled langs hardly enough I haven’t ingrained their mindset yet.

3 Likes