News for hackers. Stuff that matters.
Re:FatFs – Generic FAT Filesystem Module by tremon on Sunday January 01, 2023 @04:22PM (#34211059)
Sorry, but I can't help wonder: why?

What's the value of having direct device access in Javascript? Are we expected to give the browser raw block device access now? Maybe we could implement a FAT layer on top of S3, but I really don't see the value in reimplementing block-level storage on top of object storage.

Re:FatFs – Generic FAT Filesystem Module by kaoD on Sunday January 01, 2023 @04:29PM (#34211156)
Might be useful for non-browser VMs? E.g. a microcontroller running WASM.
Re:FatFs – Generic FAT Filesystem Module by marcosdumay on Sunday January 01, 2023 @05:20PM (#34211645)
Even tough yes, that's a good answer to the GP... Are people expecting WASM machines to be a thing? And with a different fate from the Java machines? (I don't see how they are different enough to change that fate.)
Re:FatFs – Generic FAT Filesystem Module by topspin on Sunday January 01, 2023 @06:07PM (#34212086)
> Are people expecting WASM machines to be a thing?

People are expecting to embed WASM[1]. A generic FAT can provide a lightweight storage abstraction for such work. The WAMR AOT compiled runtime is 50K; 2.5-10% of the flash memory on a STM32F4, for example. Obviously not appropriate for the smallest extant MCUs. Otherwise it's a viable choice.

[1] https://bytecodealliance.github.io/wamr.dev/

Re:FatFs – Generic FAT Filesystem Module by kzsdvkajsf on Sunday January 01, 2023 @04:32PM (#34211186)
so you can snoop on users pendrives if they make the mistake of allowing USB access from their google-chomeTM browser to your domain. ;)
Re:FatFs – Generic FAT Filesystem Module by beatrobot on Sunday January 01, 2023 @05:49PM (#34211913)
I don't think Chrome allows access to storage devices through webusb.
Re:FatFs – Generic FAT Filesystem Module by EdSharkey on Monday January 02, 2023 @01:20AM (#34214954)
I am working on a virtual computer for kids and retro loving adults. I wanted to simulate block storage using Local Storage as the backing store because I felt that blocks were very understandable. I've had block storage working for many years, but when I went to build a filesystem atop it, my design was uninspired and my implementation was buggy.

When I found FatFs, I realized I had a perfect fit: a realish filesystem with an API that I could map right onto system calls, and FAT32 - a klunky old jalopy that will need defragmenters and other disk tools to maintain it. It'll make for an altogether more interesting ecosystem and a gentle challenge for the user to maintain.

Also, there are many areas of my javascript that are primed for conversion to C -> WASM, like sprite collision detection. JavaScript optimizers have done ok with my code, but I'd like my compy to run fast on mobile too. If I am successful with FatFs, I will have a convenient spot in my codebase for converting my busy number-intensive routines into WASM.

Re:FatFs – Generic FAT Filesystem Module by efrecon on Monday January 02, 2023 @08:43AM (#34217726)
There is a project doing some version of ext FS on top of S3. Just can't remember what it's called right now. It's active and on GH.