Is Rust the best language to learn to develop on SAFE?


I’m hoping to get some free time to learn some new programming skills in the coming months, so I’m wondering if Rust is the best language for me to learn if I want to build something on the SAFE Network?

As I understand it Rust is not a great choice as a first language as it has lots of systems-level features e.g. for allocating memory which, while essential for something low-level (as in you need fine control over the different components of a computer) like SAFE, gives it a steep learning curve. For most apps it won’t be necessary anyway as the API allows you to write apps in (potentially) any language.

Right now, the best one to learn or developing apps on SAFE is JavaScript as it’s the language of the web and it’s fully supported by the SAFE API. Unlike Rust it is a scripting language so you don’t need to mess around with a compiler.

In my opinion Python - another scripting language - is the easiest one for learning the basics of programming though because it’s designed to be close to written English and does away with most of the parentheses () and braces {} which can be confusing for beginners. Python is not supported by the SAFE API as yet though.


Great info, thank you very much for the response.

I’m not an expert in Java or Python or C++ for that matter, but I am a software engineer for automated machinery (PLC’s/SCADA/Robots), so do have a reasonable level of programming understanding; I guess I need to find out how well that knowledge I have is transferable over to building apps / websites on SAFE.

I suppose another reason for wanting to learn Rust is to help me understand the SAFE network better too, but maybe you are right that I should start with Java first. What about C++? Is that useful?

On the other hand, Rust is great choice as the first languages because it successfully deals with problems (e.g. memory safety through pointer aliasing) that are still present in most languages (but hidden behind GC). And possibly because the enthusiasm and energy, of someone who’s about to start learning a language for the first time, is peeking.


Oh OK. I didn’t mean to try and teach granny to suck eggs :blush:. If you already have that experience then you’ll probably handle Rust with ease. I’m no expert, just a dabbler in things. I tried to teach myself C++ as a first language ages ago but got bogged down pretty quickly. I got much further with Python and am trying to learn JavaScript currently.


No not at all. I should have mentioned my experience in the opening post.

The trouble is most of my experience is in Ladder Logic for PLC’s with some low level STL (statement list) machine code, and with some more recent experience on newer PLC’s in SCL(structured control language) which is closer to C++ than the rest.

I do a lot of manipulating bits, bytes, ints, etc as well as a lot of sequencing, creating data types, UDT’s, etc, working with motors, servo drives, vision systems, etc. Robots can be fun and is a little like C++ too, but i don’t have any experience writing software for PC’s, apps or websites. But very interested to see what I can do, especially as my passion for SAFE grows and we get closer to launch. Seems a great time to start playing around.

1 Like

Lots of good advice in this topic, but that won’t stop me :slight_smile:

I’d suggest Rust if you want to get to into the nitty gritty and have plenty of time. Systems languages tend to take a while to learn, although the Rust compiler is very helpful, so easier than C++ perhaps. C+ is excellent, and would also fit that bill but my feeling is that you’re better going with Rust: more forward looking, will help you understand the SAFE core. Unless you’re thinking career in which case the choice is more difficult.

If you want to get building stuff, and include websites / web apps in that, then JavaScript / nodejs is a no brainer. There is certainly a learning curve, but I think it’s going to be faster and easier for various reasons, particularly if you are able to learn from using existing stuff and adding to it or modifying it. Web apps are also much easier to deploy across platforms - you literally only have one browser to target, and no packaging for different platforms.

Python is a super language and quick to learn, but falls between two stools here IMO and not the best option from either perspective. I’ve not used C# but would guess it is a bit of both, harder to learn and also a pain cross platform.

The great news though is that you will be learning a single SAFE API whichever you choose, so you will be able to take that learning with you from one language to another.

Edit @Sonder a factor you’ve not mentioned is if you have things in mind, types of application, broader aims etc, which might also influence your choice.


Thanks for that happybeing.

I suppose you are right. I need to think more about what I want to build and then make a choice from there. I suppose at the moment it is more standard apps and websites, so probably Java like you say.

Can you think of any type of app on SAFE that would benefit from knowing Rust? Or is Rust purely for building systems / software?


Rust might be best for secure/high reliability apps, embedded systems, or where performance is critical or much more important than productivity. But I’m not a Rust expert here, and I hope I’ll be corrected if I’m not accurate on this.

However, Web Assembly might change that balance point - but it is early days for that.

I’d also refer you to my comments elsewhere about doing what most interests you. Trust that :slight_smile:


Java != JavaScript. Just to nip that one in the bud before things get confusing! :slight_smile:

JavaScript is relatively simple, but the syntax has all sorts of oddities and gotchas. Personally, this irritates me, but many seem to love it. That said, it is a good tool to have on your belt and essential for modern web apps.



Python is the best languages for the development as well as SAFE.

1 Like