Writing an OS in Rust - Part 1 - A Freestanding Rust Binary

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 55

  • @SkyyySi
    @SkyyySi 2 года назад +105

    It's kinda odd to me that a video about writing an OS from scratch is this relaxing to watch

    • @UncleScientist
      @UncleScientist  2 года назад +36

      I’ll have to work on my ASMR voice

    • @jirehla-ab1671
      @jirehla-ab1671 3 месяца назад

      ​Are intel amd cpus only designed for uefi, or can they be adapted to other alternatives from uefi & legacy bios? ​@@UncleScientist

    • @UncleScientist
      @UncleScientist  3 месяца назад +1

      @@jirehla-ab1671 uefi is a specification, so it's not tied to a particular cpu

  • @foggy5249
    @foggy5249 2 года назад +53

    Yt algorithm blessed me to find this channel

    • @looc1612
      @looc1612 2 года назад +1

      Yt algorithm blessed me to find this channel

  • @local-admin
    @local-admin Год назад +9

    I’m going to have many long nights with these videos. Wish me luck.

  • @Otakutaru
    @Otakutaru Год назад +4

    Everything, from your channel profile, to your voice, workspace and skills. Zen 10/10

  • @someghosts
    @someghosts 2 года назад +4

    Perfect background video to have on while I write mediocre js

  • @fancywaifu9821
    @fancywaifu9821 2 года назад +9

    Im so glad i found someone going over this website in a video. I'm not a very good reader so having someone talk over it is super helpful!

    • @monkie-dev8000
      @monkie-dev8000 Год назад +3

      ye, same. (ye = yes/yeah a internet slang term for an expression of "yes" commonly used among gen z)

  • @lordmelbury7174
    @lordmelbury7174 Год назад +1

    Comment to feed the algo. Great video for an OG who want to dabble in Rust + OS ! Thank you for all the hard work and great documentation. Much appreciated.

  • @joelkomieter6557
    @joelkomieter6557 3 месяца назад +1

    I really enjoyed this

  • @Yadobler
    @Yadobler 2 года назад +6

    Oh my you're a madlad

  • @theroboman727
    @theroboman727 2 года назад +6

    1:51 they are doing that and its called relibc

  • @RuslanKovtun
    @RuslanKovtun 2 года назад +3

    Comment to make youtube happy. Good luck.

  • @magibai
    @magibai 4 дня назад

    Came by to check the comment section to remind myself that there are people just immune to suffering of this world.

  • @elotfreelancing1791
    @elotfreelancing1791 2 года назад +1

    Nice, finally found this.

  • @looc1612
    @looc1612 2 года назад +1

    you are my god now

  • @edgymarshmellow8493
    @edgymarshmellow8493 2 года назад +3

    Note: if you do use an arm system you could technically get away with using the first step most likely; otherwise you’d need to remake your own version to work for the new Apple chipsets…

    • @vikramvikram3726
      @vikramvikram3726 Год назад

      Can't it be cross compiled ? I know this might be stupid but im new to it

    • @sunrisexoxo220
      @sunrisexoxo220 Год назад

      @@vikramvikram3726 Arm and x86 are both different so he have to make for arm as well

  • @manuelsuarez7521
    @manuelsuarez7521 2 месяца назад

    amazing!

  • @stevemojang8736
    @stevemojang8736 2 года назад +5

    what a chad

  • @TigerGaming-kp9yn
    @TigerGaming-kp9yn Месяц назад +1

    how did you manage this with no assembly at all

  • @raphaelmorgan2307
    @raphaelmorgan2307 Год назад +2

    if you don't want to type out the target every time, you can just create a script file and put the command in there instead, then run that script instead of cargo build
    e.g. I created a batch file in the OS directory called "cargo.bat" (bc I'm on windows) that says "cargo build --target thumbv7em-none-eabihf" and now in cmd.exe, in the OS directory, I type "build.bat" instead of "cargo build"
    and I did the same with the run command

    • @sanvi4236
      @sanvi4236 Год назад

      also, you can add a ".cargo/config.toml" off your main working directory, that allows you to set some defaults when running cargo build. i think the entry youd use for this is
      [build]
      target = "..."

  • @ДенисРуцкий-у9с
    @ДенисРуцкий-у9с 2 года назад +3

    What is the difference beetwen cargo new and cargo new --bin?

    • @UncleScientist
      @UncleScientist  2 года назад +4

      The "--bin" argument is default, so "cargo new xyzzy" by default creates a binary project. See doc.rust-lang.org/cargo/commands/cargo-new.html for more details

    • @ДенисРуцкий-у9с
      @ДенисРуцкий-у9с 2 года назад

      @@UncleScientist thanks

  • @valhalla_dev
    @valhalla_dev Год назад +2

    ah shit now I'm gonna have to do this

  • @maxdignitas3698
    @maxdignitas3698 2 года назад +2

    When you ran `cargo build --target !$`, can you help me understand what `!$` means?

    • @UncleScientist
      @UncleScientist  2 года назад +10

      Yeah, it's not exactly google-friendly. The "!$" means "replace me with the last item from the previous command. In this case, my previous command was "rustup target thumbv7em-non-eabihf", so that means !$ was replaced by "thumbv7em-non-eabihf". If you look at the line immediately following where I entered "cargo build --target !$", you'll see the *actual* cargo build line that the command saw. See zsh.sourceforge.io/Doc/Release/Expansion.html under section 14.1.3 for more details

    • @maxdignitas3698
      @maxdignitas3698 2 года назад +1

      @@UncleScientist Thanks for the clear explanation! Makes sense now! (And, yes…not so Google-friendly indeed 😅)

  • @edbertkwesi4931
    @edbertkwesi4931 Год назад

    glad ibfound you really powerful mehn u the best

  • @vishalkulkarni3977
    @vishalkulkarni3977 Год назад +1

    nice music

  • @txrav8517
    @txrav8517 2 года назад +1

    i am stuck in installing rust in my windows is there any tutorial you could give me to do it

    • @UncleScientist
      @UncleScientist  2 года назад +1

      You should be able to install rust for windows using these instructions rustup.rs/

  • @cbbcbb6803
    @cbbcbb6803 Год назад +1

    Can every operating system be rewritten in Rust?

  • @abhishekmurthy9643
    @abhishekmurthy9643 10 месяцев назад

    might sound like an odd question... but can someone who doesnt know rust follow along with this?

    • @UncleScientist
      @UncleScientist  10 месяцев назад +1

      it's not really a rust teaching book, but if you know the basics of programming, you shouldnt' have any problem following along

    • @abhishekmurthy9643
      @abhishekmurthy9643 10 месяцев назад

      Thank you! @@UncleScientist

  • @Accanfo
    @Accanfo Месяц назад

    Goood

  • @heater5979
    @heater5979 2 года назад

    Great content, well presented. Would be much better without the irritating background music. If it were not for that I would subscribe.

    • @UncleScientist
      @UncleScientist  2 года назад

      Appreciate the feedback - some of the videos are music-free, so maybe you would enjoy those?

    • @heater5979
      @heater5979 2 года назад

      @@UncleScientist Ok, cool. I will continue to follow.

  • @AdamPoniatowski
    @AdamPoniatowski 2 года назад

    might as well contribute to redox OS, instead of writing it up from scratch

    • @UncleScientist
      @UncleScientist  2 года назад +6

      this stream was more about learning how OS's work than creating an actual OS, but thanks for the tip about redox - i checked it out and it looks interesting. maybe i could stream a PR for it at some point

  • @RoamingAdhocrat
    @RoamingAdhocrat 2 года назад +1

    `eh_personality` means "Canadian"

  • @lilsamura1396
    @lilsamura1396 10 месяцев назад

    good video, i want to donate

    • @UncleScientist
      @UncleScientist  10 месяцев назад

      Thanks! I don’t have anything set up for donations outside of twitch, but I very much appreciate the support

  • @dominik6647
    @dominik6647 2 года назад

    p̶r̶o̶m̶o̶s̶m̶

  • @bdeas
    @bdeas Год назад

    SPEAK LOUDER

  • @looc1612
    @looc1612 2 года назад +3

    Yt algorithm blessed me to find this channel