webassembly system interface (wasi) changes everything.. getting started tutorial using rust & wasm

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

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

  • @BinaryReader
    @BinaryReader 2 года назад +13

    These videos are incredible. Thank you for making them!! Such a rapid and pragmatic way to show these emerging developer technologies. I'm very keen on the WASI spec, sorta anticipate a time where the defacto deployment preference will be pushing WASM assemblies up to cloud providers, with the cloud providers able to trivially sandbox process IO behind WASI sys calls (and balance execution on shared hardware). Can totally see it being a slick alternative to current docker deployments. Ideally just need really optimized high level language runtimes to be running on WASM to make it practical for most devs (me specifically :P). Rust is nice, would prefer JS/TS or C#.

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

      i have one in the pipe for assemblyscript and as-wasi (which is really typescript). If you check my WAPM video out, it'll give you most of what you need. and totally agree on the push wasm assemblies point.. i really do see wasm as the future universal binary

  • @shlomohassid5888
    @shlomohassid5888 7 месяцев назад +1

    Chris! You have great tutorials and content. This should be a 1.2m subscribers channel - Keep up the good work and PLZZZZZZ don't become like all those programming "influencers"... I like that your content has no "noises", no "extra hyping", clear and clean voice, and no fancy ridiculous editing.

    • @chrishayuk
      @chrishayuk  7 месяцев назад

      Very kind, tbh, I’ve experimented a lot, including background music etc, just doesn’t work, so i landed on this. I do all the editing myself hence why I keep it simple. lol. Thanks for the kind comments. I always try and keep things that one level deeper but hopefully just one level and no more

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

    Ctrl-E to go to end of line in the terminal. Use Crl-R for history-search-backwards. Thanks for the video - I will probably use wasi myself now.

  • @casualweekday-ytshadowbang2469
    @casualweekday-ytshadowbang2469 Год назад +1

    Best explanation I’ve watched so far on this topic. Great video!

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

    Imagine video games mods being written in WASM instead of Lua.

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

    Great video Chris!

  • @ay-pj8co
    @ay-pj8co 2 года назад +2

    TS is compiled to JS now just like C++ was compiled to C at first. I think just like C++ TS will not be compiled to its older subset. I can see TS being compiled to WASM to run natively on browsers in the future.

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

      I think something like this exsits, assemblyscript

    • @ay-pj8co
      @ay-pj8co 2 года назад

      @@jfk1337 yes but there are too many differences between assemblyscript and typescript for it to be considered a typescript to wasm compiler imo. Its more like a new but very similar language.

  • @1414tyty
    @1414tyty Год назад

    It seems like you could design an Operating System to bridge the wasi hardware gap. No linux, just "drivers" to coordinate with the system interface. Not sure if there's anything to gain from this, but seems really cool!

    • @1414tyty
      @1414tyty Год назад

      In this way, wasi would be your "OS" target. I wonder if the system interface is missing any important features to be a full fledge target?

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

    Quick & Nice explanation

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

    It would be interesting if wasi (or something similar) became the next application deployment environment. Never mind Docker, this could also replace Java as the go-to cross-platform target.
    How far from a good, cross platform GUI widget library are we?

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

      agree. i have high hopes for webassembly becoming the universal binary
      for gui stuff, i think blazor is where good ground is being made

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

      I think Flutter is a great solution. It basically supports all the platforms you can think of and you can use wasm Dart package to run your wasm files if you want.

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

      @@chrishayuk I think Flutter is a better GUI solution if you want to target Mobile and Linux too.

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

    I only need concurrency and http requests and I could start using this for everything.

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

    Been a C# dev for a decade+. Been looking into C and C++ for performance reasons, and thus also been looking into Rust, which seems to be replacing C/C++ completely (since it has same/better performance, guaranteed no memory leaks and null pointers, and is even compatible with C/C++ libs.)
    Now I am learning the greatness of a standardized system interface (across platforms) which WASI seems to bring. But I don't understand. Will everything be complied to Javascript as is the case for WASM?

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

      Your last line is a bit wrong, things are not compiled to js in wasm, browsers have the ability to run wasm binaries directly and js is only needed to do some dom interactions

  • @user-qm6up7kz4n
    @user-qm6up7kz4n Год назад

    Is wasm64 not availiable yet? That means every usage of f64 wouldn't be valid?

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

    fast fun

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

    Hmm, even with the sandboxing, you can still do harm to the underlying system. Imagine writing an infinitely big file. Or using up all CPU...

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

      That's why there are CPU and FS quotas

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

    I liked the video but the music in the introduction was quite jarring, I don't think it fits your tone

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

    An application which has access to filesystem, network and IO is inheritely not safe and breaks the encapsulation. I think WASI is going contrary to the spirit of WASM.

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

      This would be solvable with a permissions system, like how we can already request access to camera and microphone for video calls.

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

      @@evolutionx1 WASI feels redundant , we're basically re-implementing the operating system at this point lol

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

      With obvious gains ofc to portability and cross-platform apps... but WASI feels like a very heavy abstraction to achieve that (from a performance perspective). Is that just me? Maybe I'm missing something about WASM.

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

      @@stickyfingies Let’s take this perspective: Many languages compile to wasm and interoperate easily with wasm libraries. Plus it’s quite secure.
      Now it would be nice to salvage this power for applications outside your browser. Where? Imagine a wasm plug-in system for your text editor. People could write their plug-in in their language of choice, since wasm is a compilation target. No need to be locked to vimscript, lua, elisp, etc. Wasi makes this possible.
      Also, Write python apps without dependency hell? Hell yes.
      As for performance it’s “near native” so a little bit slower in exchange for portability. Areas where cutting edge performance is desired ofc you won’t use wasi.
      Another comparison:
      “Java: write once, run everywhere.” => Only true for the jvm ecosystem. Call Java outside of it or in the browser? Good luck. Despite this, Java has become popular.
      Wasm + wasi would be: “compile once, run everywhere” => Browser, on your operating system, inside of other languages…

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

      @@hermes6910 not sure what you’re asking. If you’re asking why you why would write Java/python to build a wasm app, then yes it’s a weird idea. If you’re building a brand new app, you wouldn’t choose those technologies. But you can port already existing code to wasm and use it that way. And it’s only a little bit slower

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

    Tune down that intro song, it literally blew off my phone's speaker