I made my own Text Editor (in Rust)
ฝัง
- เผยแพร่เมื่อ 30 ต.ค. 2023
- notepad is impressive
Fextify: github.com/face-hh/fextify
Patreon: / facedevstuff
Discord server: / discord
Twitter: / facedevstuff
MUSIC:
Background song (1) - • crepuscular rays
Background song (2) - • Crossover - Persona 5 ...
Background song (3) - • Flamingosis - Flute Salad
Background song (4) - • Sandman - Ignite
Outro song - • 9 • Nine Nights • Day ...
Character art by @JersonEXE
- Twitter: / jersonbrawlstar
Thanks for watching! - บันเทิง
“Made my own editor in Rust”
> writes text editor in JS and CSS
Alright bud
Yep, I feel betrayed and lied to.
It was a Rust/HTML/CSS/JS mix using Tauri
less than 10% rust code 😢
@@mollthecoderIt's technically a JS text editor not rust.
Rust was only used as wrapper to do basic operations which could be done in js anyways.
Title should be * I made a Js text editor but added few lines of rust for a clickbait *
@@vicenteeduardo5598 27.6%
literally the prime example of a UI made by a backend developer
well it still manages to look better than like half of all windows programs
"Why do we have to turn a string into a string" succinctly describes my least favorite thing about rust.
But but but but safety and speed and blazingly fast (rocket emoji)!!!111!
well, atleast you wont end up segfaulting due to string difference
I felt that inside
Oh, you see, when you create a string in rust with double quotes, you are actually creating a string literal, which is a reference to a string slice on the data section of the binary. The String type is a owned type that can be modified and is stored on the heap. That's why you need to turn a string (literal) to a String (owned).
@@henriquekirchheck Neat. Personally, whenever I need a simple string, I create my own garbage collected VM language running in my custom kernel mode environment made by manually flipping 0s and 1s using a magnetic needle and using SIMD instructions for performance and semaphores for thread safety. You know, just to be sure.
My man frameworker using JS and CSS on a "rust" project instead of coding it from scratch like god-sended Terry Davis intended
This
As a web dev and back end dev that codes in JS, this video is pain, and I love it.
Well done soldier, we need more people like you.
No we dont need more electron apps
i hate electron
tauri is damn underrated. really love seeing a youtuber making something with it :3
I'm just starting with Tauri with no web experience (well, my Javascript knowledge is from 15 years ago).
I'm definitely going to check out your code to see how the heck to pass data back and forth between frontend and Rust.
Best of luck! You can also read tauri's documentation on that, it's pretty easy!
I can finally make bad code... blazingly fast!
As a newbie to Rust I appreciate projects like this !
I'm learning my first steps on Ondin Project, and THIS is what I want to achieve.
Thanks for the inspiration.
This is cool, I want to try this out as well. I wrote a text editor a couple of years ago in C#, however I wasn't really satisfied. Pretty much 90% of it was just using/calling existing functions for saving a file, loading, rtf text fields with its methods to get the cursor position etc. I think I'm gonna go deeper next time and try writing more of it myself 😊
can't wait for the next episode called "i shat myself (in rust)"
5:59 fixed the code by changing it to fixed 😂 (yes ik css it means that the element sticks to wherever it was on the screen when scrolling)
greatest pun of all time
I mean, this is just Electron on steroids.
How do you deal with file corruption? If a file is corrupted, it's lost forever?
since every file you're modifying & creating is saved in real time, there's really no point in handling file corruption (i think)
If a file is corrupted, the most you can do is detect an app crash and save the changes to a temp file instead of the original file.
If the file is already corrupted, it's Joever
although some programs do have integrity / sanity checks on files, editors typically don't have to worry about this and can leave it up to the operating system. some configurations allow you to have redundancy data like error correction codes that can help restore corrupted files.
this video makes me happy
Hey, Why not Egui or Iced? They are pure rust and native, not just web view, they might can help to improve performance even more :3.
I knew egui existed but I didn't know it supports styling too, so I defaulted to using Tauri since I knew it was popular, I might try it next time I deal with Rust and need a GUI cuz it looks fun
I made a text editor: I sleep
in rust: REAL SHIT
insane
you rocks mate!!!!
My man used jquery in 2023 💀
why not?
yay now my notepad can use 300mb of ram too, i hate having all that crusty unused ram on my system
It's akshually 🤓 60MB at most, the software itself is using 3.5MB & the rest is used by Microsoft Edge WebView2. Having 50 files opened, it increased by 2MB
it's electron that uses that much ram per app. tauri is slimmer
I was expecting something more...low level since it's Rust
JavaScript is too easy
tl;dw
very nice
How did you add this line-counter 0:50?
You're so underrated
"Mouse is bad" couldn't agree more!
Making a text editor in a text editor
does it have bussin support?
bro casually remade obsidion as a side project
well jquerry is hated bloated and bad practice, also it's old and deprecated
"i created life, in rust"
you can also use editor JS
anyone know what program he used for the logo design?
i use pixlr for all image editing stuff
Now all you need to do is add LSP support
you should have used a rust frontend framework or iced, egui or something similar
jQuery's biggest downside is speed, I think it's still worth it depending on your project though
naisu :)
Please replace the command panel shortcut with CTRL + O or anything else, because everytime I Press CTRL + P, it gives me the microsoft edge print tab
sheeeeeesh
wow a youtuber who actually made a good program!
vim?
i like the regular notepad because it's the cleanest editor ever
you have an entire screen for writing space and having 40% of the screen just for writing doesnt seem too good for me.
tabs in notepad would be really good...
so thats why i use notepad++
looks a bit outdated but it has all necesarry features and unceserassy featurs hidden
Notepad has tabs now though.
@@NiffirgkcaJ i don't really see it
Use dred, it is as fast as old Notepad and has tabs (you can also make your own themes!)
@@captheobbyist6434 it's available in Windows 11, I think.
Logo looks really like faraday's logo
If this had syntax highlighting for languages as well, I'd switch to this text editor unironically haha
cool
No vim support? This editor is SLOOOOOOOOOOOOOOOOOOOOOOWWWWWWWWWW
Can you please make the music quieter in the future, I am having a hard time understanding you.
What does rust even do? What is it used for?
he used JS and CSS no rusy
You made the text editor in javascript not in rust as you have used tauri as a webview only.
2:59 In rust we trust ;-)
i thought it was in the game Rust, i was so confused
i cant accept the notepad slander
lmfao jquery moment. vomitting
jQuery is pretty nice, but I see little reason to use it in general.
Kewl
C L E A N
"5 years ago is outdated"
>Meanwhile: using jquery
Jokes aside, it looks pretty nice, seems to do its job, and most importantly is not (quite) electron; so it's good
"not even made using the best framework ever, electron" 🤡🤡🤡
Can you plz make a vid on C++ im tryna learn it
maybe, i was planning on doing it but got distracted with rust lol
So you just coded a website and wrapped in a WebView?
rust for the win 🦀🦀
What? He literally used JS for the most part
great video, despite the thumbnail & title 😂
love your vids mr. british man
ummmm, they updated notepad
1:16 is it just me or do i just see a whole bunch of "putin"
It's "input" 💀, I pasted that since I had it in clipboard
@@FaceDevStuff I am aware. I just happened to find it funny
bro just use the attr contenteditable llmao what u doing
Notepad is the best for me and I'm not even joking
...but that doesn't mean that I don't love your editor!!!!!
My favourite text editor is VSCode with vim bindings.
jquery
const $ = (q) => { return document.querySelector(q) }
const $$ = (q) => { return document.querySelectorAll(q) }
For everyone struggling with Rusts String shenanigans,
Let's get Rusty made a good vid explaining all of it.
th-cam.com/video/CpvzeyzgQdw/w-d-xo.html
Frankly it's an eye opener.
first
ok. Text editors r mid. Make an IDE. (not a discord one)
omg why jquery 💩
- Not even a programming text editor
- Made with JS and only binded with Rust which is less than 10% Rust src even though rust is more verbose
- Clickbait
i hope you won't go and create os in html/css/js and call it rust-written XD
what is this nightmare men ? what notepad ? you are just coding in html and css and js XD
Like why use html, this is a abomination. You are using rust to make things fast but then ypu slow it down by rendering html css and js.. just make it native, use open gl or whatever
Speak slower bro
hi angelo
Wants to make a "blazingly fast" editor, uses jQuery...
I was expecting something more...low level since it's Rust
JavaScript is too easy