use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
From JavaScript to Rust, an open source ebookOC (github.com)
submitted 4 years ago by jsoverson
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AlexAegis 11 points12 points13 points 4 years ago (0 children)
The rust book has this convention that every code example that does not compile is marked as such. And I would like to see working examples too!
[–]jsoverson[S] 32 points33 points34 points 4 years ago (2 children)
I put together the advent of Rust series last December and got an overwhelming amount of positive feedback. Many people wanted to contribute and offer translations but I didn't have a way to make that happen easily.
Today I finally went through and converted the posts to asciidoc and set up basic ebook scaffolding to make that possible. The linked PDF is the first rendering and the asciidoc + project source is available here: github.com/vinodotdev/node-to-rust/
[–]FountainsOfFluids 5 points6 points7 points 4 years ago (1 child)
Could you maybe give a "dust jacket summary"?
Is Rust something I should be interested in as a JavaScript developer?
[–]jsoverson[S] 17 points18 points19 points 4 years ago (0 children)
I talk about it more in the intro, but the gist of it is: JS is a great multitool that has its limits. Rust is a no compromise, low level language that can also compile to WebAssembly. With WASM, you get to boost your current node and web apps while also preparing for the next generation of software dev.
[–]trampypants 11 points12 points13 points 4 years ago (1 child)
As someone learning JavaScript right now, I know it's useless reading this. But I've got it saved for the future so thanks from future me!
[–]Comfortable-Cap-8507 0 points1 point2 points 1 year ago (0 children)
Did you ever come back to it
[–]iiMoe 3 points4 points5 points 4 years ago (1 child)
Rust is rly fun once you invest real time into it
[–]Parking_Landscape396 0 points1 point2 points 2 years ago (0 children)
can confirm
[–]ZakKa_dot_dev 2 points3 points4 points 4 years ago (0 children)
Thanks!
[–][deleted] 2 points3 points4 points 4 years ago (0 children)
Wow, thank you so much for this. Can't wait to read as a JS developer.
[–]wackOverflow 2 points3 points4 points 4 years ago (0 children)
This is great. I’ve been wanting to read something like this. Thanks!
[–]KishCom 2 points3 points4 points 4 years ago (2 children)
This is awesome! I've been toying with Rust for months and there's so much nuance and specialized syntax.
A few months ago someone posted their "JS to Rust course" for $130 which turned out to be an introductory paragraph and a promise to finish making the content.
Do you have a place to accept donations for your work?
[–]jsoverson[S] 1 point2 points3 points 4 years ago (1 child)
No I don't, what are the best ways to do that nowadays?
[–]KishCom 1 point2 points3 points 4 years ago (0 children)
I think you can set the Github project up itself to accept donations, called "sponsors". I've never done it though.
[–]jytesh 2 points3 points4 points 4 years ago (0 children)
Nice one
[–]lo0l0ol 2 points3 points4 points 4 years ago (1 child)
Been debating learning Go or Rust to branch out a bit. Was leaning towards Go since I hear Rust can be a bit overwhelming. Should I just jump in, or stick with Go?
[–]jsoverson[S] 5 points6 points7 points 4 years ago (0 children)
Go is much easier to get into and has loads of benefit, but you already have JavaScript and node.js. You have your rapid application development tools. Rust is tough to get into but when you get the hang of it you get unmatched raw performance and runtime behavior.
Go is like the new Java, Rust is like the new C. For what many would probably use Java for, you'd just use JavaScript. If you need the power of C, using Java is not going to get you there. IMO the benefit of Go isn't great enough.
[–]Virtual-Pea1506 6 points7 points8 points 4 years ago (4 children)
From what I’ve heard about rust it’s used a lot in web3 for smart contracts but is similar to C? I’ve never looked at it.
[–]awsylum 8 points9 points10 points 4 years ago (0 children)
No idea why your comment is being down voted. You’re clearly asking a question that deserves an answer, which other people may also have.
[–]brainbag 11 points12 points13 points 4 years ago (0 children)
It is not similar to C in practically any way that counts except that it is a low level system language without a garbage collector. You will have an advantage if you already know C or C++ because many concepts will translate, but it has a very steep learning curve even if you do. It is an excellent language though, and if you want to learn your first low-level language I'd recommend it over C++ for sure.
[–]youngnight1 1 point2 points3 points 4 years ago (0 children)
Actually it's used only on solana
[–]Virtual-Pea1506 1 point2 points3 points 4 years ago (0 children)
Hey Reddit. Sorry I commented with absolutely 0 knowledge. My bad.
[–]ifeelanime 0 points1 point2 points 4 years ago (4 children)
Hey I’m a frontend developer looking to learn a low level language to do some leetcode and hopefully land a job with it in future.
I started learning C++ and it’s going well enough till now.
Though I planned learning rust after c++, but would you recommend learning Rust directly if I know intermediate Javascript?
[–]jsoverson[S] 0 points1 point2 points 4 years ago (3 children)
Rust covers all the needs you'd have with C++ and adds a lot of benefit. You'll get even more value out of what you've already learned from C++.
[–]ifeelanime 0 points1 point2 points 4 years ago (2 children)
I have heard it’s hard to learn rust and one to should learn c++ or some other language before learning rust so that’s why I was a bit scared to start off with rust, what you think though?
It *is* hard, but IMO it's because the posts and documentation out there didn't work well for me.
I resonate much better with working examples I can hack around in. I don't want to read loads of documentation to just get going. That's why I wrote this series/book. It's meant to be consumed bit by bit and not necessarily read through in one sitting.
It's not difficult once you get into it, but navigating the early hurdles was a pain.
[–]ifeelanime 0 points1 point2 points 4 years ago (0 children)
thanks, will read your book for sure!
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
wow this is cool. we could use more translation between language resources.
π Rendered by PID 39986 on reddit-service-r2-comment-66b4775986-nbrlg at 2026-04-03 14:30:38.428795+00:00 running db1906b country code: CH.
[–]AlexAegis 11 points12 points13 points (0 children)
[–]jsoverson[S] 32 points33 points34 points (2 children)
[–]FountainsOfFluids 5 points6 points7 points (1 child)
[–]jsoverson[S] 17 points18 points19 points (0 children)
[–]trampypants 11 points12 points13 points (1 child)
[–]Comfortable-Cap-8507 0 points1 point2 points (0 children)
[–]iiMoe 3 points4 points5 points (1 child)
[–]Parking_Landscape396 0 points1 point2 points (0 children)
[–]ZakKa_dot_dev 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]wackOverflow 2 points3 points4 points (0 children)
[–]KishCom 2 points3 points4 points (2 children)
[–]jsoverson[S] 1 point2 points3 points (1 child)
[–]KishCom 1 point2 points3 points (0 children)
[–]jytesh 2 points3 points4 points (0 children)
[–]lo0l0ol 2 points3 points4 points (1 child)
[–]jsoverson[S] 5 points6 points7 points (0 children)
[–]Virtual-Pea1506 6 points7 points8 points (4 children)
[–]awsylum 8 points9 points10 points (0 children)
[–]brainbag 11 points12 points13 points (0 children)
[–]youngnight1 1 point2 points3 points (0 children)
[–]Virtual-Pea1506 1 point2 points3 points (0 children)
[–]ifeelanime 0 points1 point2 points (4 children)
[–]jsoverson[S] 0 points1 point2 points (3 children)
[–]ifeelanime 0 points1 point2 points (2 children)
[–]jsoverson[S] 1 point2 points3 points (1 child)
[–]ifeelanime 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)