Quick question on Rust

I have a feeling a whole lot was done recently, but never head explicitly what happened;

Was the whole SAFE redone in Rust? Or just part? Was the C++ part thrown in the bin? I heard it went from 560k lines of code, to 76k, and now with Rust, down again to 7k. Is that for the whole project?

It’s amazing to think the whole project could be only 7k lines of code and contain all the self authentication, de duplication, self healing, heavy encryption, farming, update testing, etc etc and be the whole world’s internet, all in 7k lines of code.

If this is really true, then talk about efficient code!!

1 Like

It’s true and has to be our goal :slight_smile:


Is testnet3 still going to be released in C++?


It seems that because of rust’s efficiency that it would be better to scrap C++ and push forward with rust.

Measure twice cut once. Do it right the first time.


Mind blowing.

That’s enough to convince me to go learn Rust.

Way to go team; keep it up :slight_smile:


Wikipedia description
multi-paradigm: compiled, concurrent, functional, imperative, object-oriented, structured
Designed by
Originally Graydon Hoare, then Rust Project Developers
Rust Project Developers
Appeared in
Preview release
1.0.0-beta.2 / April 17, 2015
Typing discipline
static, strong, inferred, nominal, linear
Influenced by
Alef, C#, C++, Cyclone, Erlang, Haskell, Hermes, Limbo, Newsqueak, NIL, OCaml, Python, Ruby, Scheme, Standard ML, Swift
C# 7, Elm, Idris, Swift
Implementation language
Linux, Mac OS X, Windows, FreeBSD, Android, iOS (partial)
Apache License 2.0 or MIT License
Filename extension(s)

Notice at the bottom it says “iOS partial” @Viv is this still the case? How does this affect your team porting if so?

1 Like

How much memory does the SAFE code now take up?

All the positive comments I’ve seen concerning Rust have garnered my interest.
I don’t think this is too off topic, and the OP has been answered, so I’d like to ask a question.

Would Rust be suitable to learn as one’s first programming language? Or would it be advisable to gain a grounding elsewhere first?
I can research this elsewhere also, but I greatly value the opinion of those in this community…


It is easier than you imagine, although pointers and borrow will cause headaches. So if you are determined I would say yes, however python is a great language just to get used to loops & conditions etc. i.e. the programming mentality. Ruby was a python competitor really and an incredible amount of ruby folks seem to be coding away perfectly fine and with good results in rust.

A neat thing is that it is new and the community are really friendly and expect all the extreme new folks to have lots of questions. So from that perspective it seems to be a nice entry. I would caution against it as a first language, but many folks are like myself and enjoy being told that it’s harder and so I jump in. I am sure either way any language is great to start with.

[edit] I should add you will see a difference in dev updates from us, enticing folks to join in development, however small a contribution they can make (even adding a comma to a documentation line! So in SAFE you will find willing teachers I would hope)]


Its definitely not easy as a first language so I would advise something simpler while you get the basic concepts of programming, and something that is designed / ready to support learning. Rust is still a bit rough around the edges with regard to tools and documentation.

Having said that, you might want to try reading The Rust Programming Language (visit http://www.rust-lang.org/ and click on Book) and see if it seems too much or is something you feel ready to get your teeth into. I’ve just read it and frankly, if I hadn’t already known C++ well, it would have been quite a stretch. As it is there is a lot I don’t understand how to use yet - but I do get most of the meaning.

I can share my list of docs and resources if you want to delve more into Rust, but as I say, maybe try something that is set up for someone really new to learn. I look to others for recommendations, but there are some websites built specifically to provide the documentation and interactive tutorials, so a recommended language that has that kind of support would be my suggestion. Just not sure which language to suggest at this point!

just wondering @ this part.

was all the C scrapped?

I’m not sure what you mean by thrown in the bin. Its not physical stuff. Rewriting is like translating. What would you mean if I translated your post into French? Would you say the English was thrown in the bin? If so, then yes, the C++ that is being re-written in Rust is no more, it is “in the bin”. Hope that helps! :slight_smile:


So French is a better language? Wow, better get on that. :slight_smile:


Agreed it’s a tool, we need to hammer lots of nails in and a nail gun appears so we pounce, the other nails are fine just we move faster now.


Without doubt it should be Python for beginners. In fact everyone at school should really learn the elementary basics of programming, and that should probably be HTML as the first half and a small bit of Python as the second half, perhaps getting python to auto generate some HTML for you in order to demonstrate the utility of automation.

Python is the steepest trending programming language of the past decade, and for very good reason. Its only real deficiency is that it takes years of practice to understand how to write very high performance programs, perhaps as much as 10,000 hours, similar to C++. If you don’t need very high performance though, Python is virtually unbeatable as a general all purpose programming language, plus it can be compiled native to .NET, native to JVM, native to Javascript (i.e. the web browser), and of course native to the CPU. It’s also astonishingly powerful - you can freely rewrite a preexisting codebase arbitrarily from Python as the program runs i.e. Python programs which rewrite themselves as they execute.



Oui, c’est un bon langage. J’adore le français.


(#)include French

init main() {
var getting = (“bonjour”)
return 0;


Ok, so for those who want to have a go at learning their first language, Python seems a good bet. Here are some starting points (I just searched “how to learn python” so haven’t tried them, but from memory Codeacademy is good):

And for the masochists, just dive right into Rust here:

But first, say goodbye to friends and family.

Happy programming! :slight_smile:


Thanks for the responses everyone.
@ned14, I agree it’d be good for children to learn programming at school. I’ve noticed things heading in that direction, for example Barclays Bank have had adverts on the TV (in UK) for their code playground

I’m going to try learning Python and simultaneously phase into learning Rust too!

@happybeing - thanks for the resources. I’ve already had a look at codecademy, and I agree it’s good (and free).
I’ve used coursera before and I’m impressed; they have some Python courses coming up.
I also found http://rustbyexample.com/ which at first glance looks useful…

1 Like

Good luck, have fun, ask if you need help, and please report back on anything that you think might help others.

1 Like

I’m going to try to jump into Rust over the next few weeks, I’m excited to do so.

As for application development, what languages / frameworks are available to developers?

1 Like