Live data from Hacker News

UEFI Bindings for JavaScript

codeberg.org

41–50 of 117 posts

Re: UEFI Bindings for JavaScript

#41

Does it manage to support floats? I am not sure if those can be safely used in the UEFI environment. (I recall GRUB’s build of Lua being integer-only, and Linux avoiding the use of floating-point arithmetic in kernel mode, but I don’t remember the reason.)

Yeah floats works

Re: UEFI Bindings for JavaScript

#44

Can someone break this down for me? Looks like it's using... C? to load a js interpreter which bootstraps an API around all UEFI features? Do I have that right? And, if so, does that mean that once the API has been bootstrapped, one could actually write an OS in js? Or are there other abstractions that would need to be migrated first?

OS in JS, ok I am interested now...

Re: UEFI Bindings for JavaScript

#45
post #33

Earlier quoted context omitted.

Why not?

Because this can end very badly. It is a new surface to attack

Why is it a new surface? Either you can run UEFI code, or you can't. Attacking the JS interpreter itself is unrealistic IMHO, it's the poorly written JavaScript running on top of this that might open new surfaces of attack. But other UEFI code is mostly written in C or C++, so let's call that a wash?

Re: UEFI Bindings for JavaScript

#46

Can someone break this down for me? Looks like it's using... C? to load a js interpreter which bootstraps an API around all UEFI features? Do I have that right? And, if so, does that mean that once the API has been bootstrapped, one could actually write an OS in js? Or are there other abstractions that would need to be migrated first?

> And, if so, does that mean that once the API has been bootstrapped, one could actually write an OS in js?

I bet somebody has done that.

https://www.google.com/search?q=os+kernel+in+javascript

Seems like a small number of hobbyists have attempted.

I've heard of people doing this with other high level languages. Basically you need enough low level code to bootstrap a VM. Once you have that, you can make the high level language decide some logic that traditionally would be in C code, like manipulating page tables or whatever.

Re: UEFI Bindings for JavaScript

#50
I’m always amazed and slightly envious of what programming languages with large developer bases can do. I mean if a language is Turing complete it can do anything, but JavaScript takes this to the extreme.

Mind you I never said anything about quality or performance, obviously doing everything in JavaScript comes with it’s own issues but if you were to say that someone got JavaScript running in the Linux kernel as a POC I wouldn’t even be surprised

Post reply on HN