It's hard to believe, a hot running fan blasting i9 loses by a factor 2 in a real world Rust compile from a passively cooled M1 macbook air. This has consequences.
Today we launch an early alpha version of Makepad basic! Play with Rust+Wasm live. Compile and run the makepad desktop application for mac/win/linux yourself with Rust:
The more Rust you write the crazier class-based OOP is. Somehow we were led to believe it was necessary or something. Animal Dog Cat and nonsense like that.
As a 15yr C++ veteran, 10yr JS refugee going onto Rust. Yea ok. Maybe i do over do it on the salespitch but 'it fing works yall'. Screw your old C++ crap. I saw an embedded Rust talk the other day that puts C to shame. Bigtime. Its EOL.
All that is left now is for apple to make a x4-or-so-scale GPU version for their pro line, add a 32gb ram option and it's a no brainer for, well, everyone really.
Makepad gets live shader coding + sliders + colorpickers! The first of our live updating Rust macros. Try here working on web: github shadercompiler branch, master soon!
Our stack is now completely Rust from frontend to backend. On server it feels so optimal and stable, on the client i can sustain far more complex applications than ever before in a tiny footprint with wasm (still 360k code otw) feels like the future compared to JS or other stacks
With AWS moving to millisecond-billing learning Rust is the smartest move you can do as a backend engineer. Your skills can save the companies you work for many millions. Don't undervalue yourself, and develop those skills.
When i look at how much of our dependencies come out of Mozilla R&D its crazy. Rust, WebGL, and asm.js->Wasm. Without mozilla i could not have done anything on web, and would have left a decade ago.
This may be the biggest thing happening in computer graphics mathematics a 'new', much simpler way to do 2D/3D geometry maths with far less edge-cases/ifs.
'Does Rust hurt your dev velocity'. With C++ or JS my dev velocity was 0 because i always ended up with a heaping pile of crap. So no. It's giving me solid stable and workable velocity.
Processing 1500 cursors and typing: 4.5 milliseconds for a keypress. Damn this Rust+Wasm stuff is almost free so fast. I can't find a single editor that doesn't barf on this (sublime is horribly slow). Try it ! cmd+shift+click makes grid cursors.
One nice thing with Rust is that its std containers (strings, vecs, hashmaps) are very well thought out, not trivially made higher-performance, and let people get on with work. Every gameco in C++ has their own because std:: is a dumpsterfire.
Just in case anyone missed it: Rust + Wasm is a massive deal. It allows me to write full performance code that runs blitzin on desktop (without wasm), natively AND compile to a browser. Same codebase, same application. Its bigger than Java could ever dream to be.
Wow apparently the finances of mozilla weren't down, they were fine. And yet they chose to fire absolutely amazing 'unhireable' engineers that were pushing the web and software engineering forward like nobody else could. I guess thats what you get for not controlling yr mgmt.
These 195 megabytes, 36 files are all you need to compile Rust+java on a mac for android 33. If you strip down the gigabytes of whats inside the NDK, sdk, android studio these are the actual deps the system touches when you compile.
The biggest advantage Rust has over anything else is its fearless concurrency (threading). I've been doing a little networked audiomixer and it has 6 threads now, and 0 issues with them. In C++ it'd feel like juggling chainsaws, and python/JS whahhahah haha threading.
After being a UI programmer for 30 years i can honestly say. I do NOT like programming UIs. It takes a very high energy 'tick all the boxes' OCD without laziness to be halfway good. I've tried everything in my power to be lazy at it, and you can't be :)
Extra info: The M1 macbooks (air/pro) can't drive 2 external screens, and the air throttles a bit after 3+ minutes sustained compute (20-30%). My project i was compiling: native build of compiled/ran in 1 go after installing Rust
Unpopular opinion: Flash wasn't replaced by canvas/JS/HTML/CSS, a valid and useful way of authoring for web (albeit power intensive at the time) was simply lost and hasn't been replaced yet. Unity being the new home for the flash developer.
Makepad on apple M1: had to add the target in Cargo Aaan BUILDS AND RUNS in one go! Go Rust! Compiles the whole thing release in 18!!! seconds. Compare that to my mb16 i9: 37 seconds. ITS TWICE the performance of an i9 on Rust compiles.
Every time someone says 'just html' think 'its 'just' a semi standardised million line C++ render engine that behaves subtly different on all your platforms and nobody fully understands how it works anymore, not even the people that build it.
When Rust came around i knew this 'compile to anything' case was amazing, what web tried, java tried, .net tried, but nothing ever worked on everything at good perf. Now as we move forward with our platform layer i'm seeing the results of this truly working.
I'm incredibly excited. Im weeks (ok maybe a month) away from dogfooding our nextgen IDE. Run applications on a texture inside the IDE. Live code the UI, live compivle the Rust code. First time in 4 years i get to have a new IDE.
@lukasbradley
@chvest
It's not Rust right, its more LLVM that we are benchmarking here and yes they should care because thats also what Swift uses and that has about the same speedup in compiling. I'm just being happy with the sideeffects there.
The most amazing thing i've seen in a while is:
An interpreter that runs at 4x slowdown of a JIT. This approach is insanely fast. We are rebuilding its ideas in Rust atm.
Thats why i dont' want 'business/mgmt people' in my company. What happened to mozilla is exactly what you get when you hire them into your organisation. Business decisions devoid of vision run on a bottom line that they just 'oopsed' entirely.
Hot take: Inspectable/browser debuggable DOM is the 'fake' idea of web being open. I can't host google docs myself, i can't meaningfully change its code, this idea of an 'open' web is fake and bs. Having a browser that can run anyones code, however is important.
5 Years after my JS experiment 'kinda' worked, i have achieved inception again. Live editing makepad studio inside makepad studio. This is my benchmark. If i can do this productively, its good tech.
Entire makepad in wasm with brotli is at 350 kbyte now. All it needs is a ttf file and it works. Looks like Rust+Wasm is stacking pretty fine in terms of all this 'web bloat' JS is pulling.
The difference between Rust vs C++ is not just 'its another language, another tool, and all are useful'. It's hey we used to drive without seatbelts, figured out that was rather risky, invented them, and now almost nobody drives without them anymore.
Introducing our figma UI prototype of Makepad Studio!
A hybrid code/design tool for our MIT licensed Rust UI stack. Designed by my amazing co-founder
@sebmichailidis
youtube:
Like, yea C++ is fine yea i sure i understand. NO IT IS NOT FINE. Every line of C++ should be surgically removed from the world if we can. C shortly after. These are defunct tools of the days where we trusted human minds with unbounded memory.
Maintaining a 100% mapping between web and native is quite a bit of work, but i just added clipboard+IME support for Cocoa. Rusts interop with ObjectiveC is really amazing.
Turns out a terminal + keyboard is actually far superior to someone with a weeks practice, than some crappy slow web UI with a mouse and broken keyboard nav.
'But Rust is slower to write' It might be a tad slower for the first 300 lines. However once you start growing and refactoring the speed gains are insane. I have JS/C++ PTSD and am still learning how malleable Rust code is at any point. Change something, and remove the red lines.
@McGarnical
@SyamaMishra
An M1 is 1/4th the TDP (power/heat) of the mb pro 16 i9 so it doesn't need a fan, and its twice the speed on a real world Rust compile.
When dealing with data 'immutably' Rust almost becomes like a normal language. The difficulty only arrises with mutability. Which is great because then you try to avoid mutability.
The best way to prepare yourself for a career in venture capital is to start a startup. But if you do that well enough, you won't need a career in venture capital.
The more i look at vscode, the more i see how well done it is. Sure its slow HTML but atleast EVERTHING works. Window too small? menu stacks. All the drags and drops work. It's just a very finished product.
The gap between # defines and templates and what Rust generics and types can do is OCEAN wide sorry. Sorry not sorry really y'all C/C++ people need to get the memo. And yes. It will be uncomfortable.
Today was a good day. I have makepad applications now running on: iOS, Android, Mac, Linux, Windows and Web. I finally shook the shackles of the browser and my little fun examples just run on the devices i have lying around. And 3x faster than in a browser and more reliable
Rust is the biggest leap for me as an engineer in 20 years. You get to deploy to web AND run locally. No limits. All these webby constraints like 'cant do this or that' Nope. They dont exist. Wanna do an art project? Sure here is async texturemem you can write to from 32 threads
@ryanjfleury
I mean cool resume, but yea Rust solves a huge amount of very important problems with C. And i notice it in my work every day, and so do many others.
I realise there are followers who go: Wait i followed you to listen to new GPU UI fun in Rust. Not to hear you talk about climate change. However i will occasionally also mention things like that as they are pivotal to our current world. Nobody needs a UI when we are in mad max.
This completely passed me by but QOI is 'nearly' as compact as PNG whilst being 300 loc of C for the encoder+decoder and being 20x faster at encode and 3/4x at decode. Thats super useful.
My new drawing API in Rust is about 10x what i managed in JS, i can do 100.000 animating rects at 60fps where i got to about 10k with my best efforts in JS. Now thats motivating.
The biggest thing Rust did for me: I lost my fear of SIMD, of threads, of memory, of native platform APIs (ObjectiveC, COM). It's all just a bunch of the same crap for your CPU.
The problem with the C++ vs Rust thing is that the C++ devs have always thought themselves as the smartest-of-the-crowd and top of the foodchain. So being told their knowledge is both a-form-of useless and simply the wrong way to build stable applications does not go down well.
is this the future of online collaboration? just open link and you're immediately transported to a collaborative dev VR environment. amazing stuff
@rikarends
!
Prediction: Dependency constrained Rust compiled to wasm is going to eat the entire JS-ecosystems' lunch. It's smaller, MUCH faster, and better quality code.
Tonight's experiment:
The start of a minimalist text editor written in
#rustlang
.
Clean builds release in ~4 seconds.
Executable is 1.1 mb and includes the font.
Interesting that on MacOS almost all meaningful applications you install are 'sideloaded'. Watsapp, chrome, spotify, github, Rust. There is almost 0 useful distribution via appstore i come accross.
It is time! I'm pushing the entire makepad stack to crates io. Of course i'm being immediately rate limited. Hope this doesnt take 3 days to get through :).
Holy cow. If you look at 'third party software' in the spotify client and copy that list into a file its 3330 dependencies. Of which chromium is just 1.
Can someone tell my why i would use tokio-rs for doing networking? Isn't anything under 1k concurrent connections better off with threads? Also for most servers that 'do' anything scaling out horizontally will happen quicker than needing async-io?
Makepad studio. You have a 'run' panel on the left where you can run as many parallel platforms active at the same time and live code them. And the app runs inside the IDE itself as a texture as well (x-process).
Eddy just published our Wasm engine we'll be using inside makepad studio to run extensions/treesitter blobs. Compiletime: not noticable (disappears in parallelism), 15kloc. So proud!
I just published Stitch, a very fast and lightweight Wasm interpreter that we developed for Makepad, to .
#RustNL
Please check it out and let me know what you think :-)
Currently writing a GLSL and Metal shader compiler from 'Rust syntax' just like makepad was JS. If this is done it will be a high perf UI stack for Rust that compiles cleanly to iOS, desktop GL and webGL/wasm. Quite exciting.
Once in a while a new technology comes along that is so absolutely jawdroppingly amazing it can change technology use in an entire industry like Dreams from
@mmalex
et al at
@mediamolecule
I really really hope Sony sees the value for the entire industry and sets it free.
@SaldytLucas
@DJSnM
I have not needed modularity in a laptop for the last decade, and they are not just sleek they are extremely userfriendly and now absurdly fast/energy efficient computers. With parallels on it its all i need.
As of today i'm now looking at compiling a full desktop IDE in release mode with all deps in 18 seconds. I think Rust is starting to look very appealing with the arrival of the M1, the disadvantage of compiled languages on that domain is shrinking.
When i failed with makepad-JS a few years ago, i really had a hard time learning a new language (Rust) and had to learn all the platform tech (ObjC, Windows, Linux, Wasm) however its all just programming. Never fear to grow/pivot as a developer (even when older). Just do it.
Work in progress. We now have rustybuzz support. And live editing AND live recompiling a makepad application via cross process texture inside the IDE on the right. Also very early first version of
@ejpbruel
's new code editor.
Drag and drop of selected text in text editors is a bullshit pattern. I'd argue 99.99% of all drag and drops are misclicks. I propose to just not do that.
Subtle way apple destroys web applications compared to native: On low power mode request animation frame runs 30fps. Even if yr highly energy efficient, it doesn't matter. Web cannot get you a nice experience period (plain HTML scrolling does work tho)
The aversion to 'repetitive tasks' of programmers, is at quite the contrast with many hand-work things like knitting or embroidery. Actually many successful programming is done with a certain immunity to repetition. What of programming is more weaving than it is directing?
Rust honestly feels like magic to me. All of a sudden you stand on decades of compiler research making your inane mumblings run blistering speeds on modern GPUs. Coming from JS its the closest thing i've experienced to having a super power.
It's so amazing to see our final path to product appear. We have an amazing UI design (done in figma) i will share soon. Should make clear what we are building :)
I think
@GoogleDocs
is the first high-profile mainstream web app that I've seen announce a move away from the DOM entirely, to an HTML canvas. That also opens the door to WebAssembly and WebGL... Super excited to try the difference.
For all you noobs out there: Just build your own 'implementations' of things. I just wrote a search engine for makepad starting from my own trie. Don't require a lib, just write it. Its not that hard.
I'm not a big fan of customizing anything, from code editors to OS settings. All your customisation becomes a workload you drag along every time you reinstall / update.