Hacker News new | ask | show | jobs
by theultdev 690 days ago
I've ran into this trying to use OPFS with Tauri. While it works in Safari 17, it's unavailable in 16 for many users.

There's also various UX differences in webviews.

It's all fine though, I'd rather have multiple webviews over a bloated app. Used to developing for multiple environments anyways.

1 comments

> I've ran into this trying to use OPFS with Tauri.

I also do file system stuff, and I'm not sure why you would even try doing this from JS when you literally have rust at your fingertips (for example, I use the `native_dialog` crate). Just seems kind of anti-pattern-ish, as JS is not really supposed to have any business logic: it's purely a front-end.

It's a React Native app. I have plans to use React Native Macos eventually but I use Tauri to wrap the React Native Web build for unsupported platforms (Linux & Mac) and as a fallback if the native apps don't work for the user.

I use OPFS on web for the SQLite database store. But yes, I will be writing an adapter using Taurus SQLite plugin to solve this in the long term.

Not a huge issue, and wasn't going to be long term anyway, but it did make it go from "you can release this now" to "oh shoot it works everywhere but on mac, now go write an adapter to this 2.0 sqlite plugin with limited docs"

And there's perfectly fine reasons to use OPFS in Tauri, it's a sandboxed file system. You may not want to deal with the native filesystem for security purposes (yes Tauri has permissions, but not sandboxing after-the-fact)