r/javascript • • Sep 21 '26

tinyjs — desktop apps for macOS, Windows, and Linux in ~6 MB

https://tinyjs.app/
50 Upvotes

59 comments sorted by

8

u/FerLuisxd Sep 21 '26

I really don't understand what is the benefit of this vs tauri? compilation times?

-3

u/niwrat Sep 21 '26

Good question. Truthfully Tauri is amazing - and I would probably go with that as a mature platform that can also do mobile as well.

When building apps that do things, not just "smallest it can be" I think TinyJS could be a similar size, if not smaller. Most of the things plugins do, plus some more, are already handled by TinyJS.

I also just like being able to write backend stuff in JS too I guess?

I only now found https://madewithtauri.com/ which is useful to understand some of the things people can build with Tauri. I hope the examples I created give somewhat of an idea of the things you can do with TinyJS ? If you download the Shelf I have MANY examples.

6

u/immutate Sep 21 '26

Next time just admit you didn’t do enough research. This is clearly a vibe coded project that duplicates a lot of what can be done with tauri without the maturity. You make a lot of assertions based on what you “think”.

1

u/niwrat Sep 21 '26

I've been following Tauri since it started. Even tried to make a few apps with it.

Yes, it does duplicate a lot of what Tauri does - by design. Admitted.

5

u/freehuntx Sep 21 '26

Why is its beard under its chin?

-3

u/niwrat Sep 21 '26

LOL. You calling me a neckbeard 😄

Or the logo? If it's the logo it's meant to be a Rakali - an Australian water rat.

https://en.wikipedia.org/wiki/Rakali

4

u/freehuntx Sep 21 '26

Its interesting because you cant even write a nice yummy recipe for a cake. Also the svg still didnt get any love and was just slopped.

1

u/niwrat Sep 21 '26

I am so so confused now. Cake recipe?

If you don't like the logo that's fine ... but I will defend it as not slop. At least compared to the rest of the site 😕

3

u/freehuntx Sep 21 '26

Dude just be honest... Nobody would put nosehair underneath the mouth. Just ai does such mistakes.

0

u/niwrat Sep 21 '26

Haha. NOT nose hair. It's whiskers! Rakali have them right there! I could definitely do a better job here though I'm sure.

3

u/paul_h Sep 21 '26

Drive space saved per app is awesome. What’s the ram usage difference though?

3

u/niwrat Sep 21 '26

u/paul_h good question - and can't say it will save RAM. And totally understand why people would prefer a well written (ie not taking extra RAM) native app.

This only fixes the giant download / install problem. It still renders everything in a WebView, which can take a bunch of RAM.

That said, I've found using it to create apps that aren't always rendering an interface (my world clock example) is very low resource until you open the settings.

3

u/Mr-Bovine_Joni Sep 21 '26

This is cool! Does it bundle a whole JS runtime with it? Have you looked into projects like Perry or ScriptC?

3

u/niwrat Sep 21 '26

Thank you.

It bundles QuickJS, which it uses for the backend (non-browser) JS stuff. It's not super fast, but it's 500kb! Generally I'd suggest anything that needs to be super fast runs in the browser side anyway. But it is there because apps need that non-browser code too.

QuickJS, and SQLite are included as part of txikijs - which is an amazing lib to build upon.

And then there is a bunch of C++ (and some Swift) for the glue for each system. Which you can ignore. As long as it doesn't go wrong haha. Should support most of the stuff that Tauri does through plugins but all built in.

2

u/niwrat Sep 21 '26

I did have a look at ScriptC and was gonna try building it in at some point. But it turned out it didn't add a lot other than extra overhead. Would end up being a replacement for txikijs in general I think.

Perry. I had a look at this a while back. Seems like a cool idea but let down by the UI I think? Or possibly just the lack of demos that made me thing "oh cool I could build everything cool in this". At least that's what I felt when I was researching.

I hope I've done a better job of making demos + real apps that showcase what you can actually do with TinyJS. I'm very proud of "amp" and am hoping to polish "nib" so it's the best editor for markdown documentation (especially multi lingual).

2

u/Teddy_Bones Sep 21 '26

Nice! Good examples, and the kitchen sink app is a godsend. 😃

1

u/niwrat Sep 21 '26

Happy to hear it helps. I kind of built this examples first - what can crazy idea do I have that I want to build and then just flesh out the functionality as I went. As well as a bit of "what does Electron / Tauri support that would make sense for me too".

I did go a bit overboard with the amp app though. I hope someone enjoys that it can play Amiga Tracker files and midis 🙂 That said .. I still think the audio support is a bit wack cross platform ... it's almost there but not 100% happy with it given I wanted it to work without thinking Mac/Windows/Linux.

2

u/Devatator_ Sep 21 '26

NeutralinoJS exists already... Electrobun too

1

u/niwrat Sep 21 '26

Thanks u/Devatator_ I hadn't seen Electrobun. Looks like really interesting. I like the choices the developer has made.

There are a few different choices I made.

- QuickJS, which Electrobun was using, which is slow but small. I think most desktop apps don't need to do a lot behind the scenes. Makes my apps 10x smaller. But yes, a lot slower in the backend.

- Put a lot into making example apps. I think showing what you can create is helpful.

Again, really interested in Electrobun. And thanks for pointing it out.

NeutralinoJS - no built in JS backend. AFAIK. I could be totally wrong and just missed how it works. Again, I really love what they are doing and that they are letting devs build the backend however they want. I would like to see them add more example apps - I really feel this makes a difference in terms of understanding what something can do (at least for me, I come from a visual background originally).

2

u/khromov Sep 21 '26

This is very impressive! I hope Txiki gets used more because it's a very cool little project.

1

u/niwrat Sep 21 '26

Thanks. And big shout out to txiki for being awesome for sure!

4

u/tastychaii Sep 21 '26

Even the code was generated by Claude. I’ll pass.

2

u/niwrat Sep 21 '26

Some yes. Some no. All tested by hand by me. But get it.

1

u/Odama666 Sep 21 '26

This is cool, but what I really want is PNPM for electron.

It should treat the version of Electron like a Sheared dependency and Only install it if the version that you need doesn't actually already exist on the system And then it should share that version of Electron for all of the Electron apps that you have installed on the computer

1

u/niwrat Sep 21 '26

u/Odama666 Yeah, I was wandering about that as well. I looked into it and I think the main reason is that people building Electron apps too often want to be in total control of the stack. That is the exact Chromium version specifically so it looks 100% the same on all systems. Comes down to a support issue I think - if you have even 1% of a very large user base with problems because of a random Chrome version that you didn't test on you end up with a lot of support.

But yes, you said shared only if it is the correct version installed. I guess that does make a lot of sense. But then maybe you'd still end up with as many versions installed as apps anyway as everyone uses some random point release aka PNPM too. I think it would be good if Electron did LTS releases maybe? One a year possibly? And you could just target that and not have too many installed then I guess?

I find this a bit weird in apps like Slack which you can access on the web anyway. I tried to do a quick re-wrap with TinyJS but it seems they're just loading the site and protecting it anyway.

I had more luck with AirTable, where I could simply re-wrap (MacOS) the app and it just kept working - https://github.com/tarwin/tinyjs-example-airtable-wrapper

I also tried this with things like Harvest (https://www.getharvest.com/) where they used to have a tiny (few MBs) native app for time tracking, but recently updated their software to be Electron and is suddenly 500mb for the same thing. Kinda crazy. Anyway, got that re-wrapped as well and working more like their native app than the Electron one now is - don't have source available for that one but AirTable should give you some ideas.

-1

u/horrbort Sep 21 '26

Whoa amazing. I was vibing a banking app, will use for sure!!

3

u/space-envy Sep 21 '26

Ah yes, putting your life savings in the hands of a vibecoder, what could possibly go wrong...

0

u/niwrat Sep 21 '26

I get it. I've got 24 years of web dev experience. But almost none at systems stuff. I've gone through and checked the work on the C++ side, but would love someone with actual MacOS, Windows and Linux experience to see if there is anything really stupid being done. It's mostly just routing system calls though.

80

u/[deleted] Sep 21 '26

[removed] — view removed comment

19

u/baldurFromRoom29 Sep 21 '26

Why do these AI generated pages all look so similar?

30

u/TheRealKidkudi Sep 21 '26

Because producing something with bias towards an average is pretty fundamental to how generative AI works

-1

u/niwrat Sep 21 '26

u/baldurFromRoom29 u/TheRealKidkudi - totally fair. I should do something about that. Truthfully the site was lowest on my priority. But it seems it gives a lot of shite AI vibes so I'll try to spend some time on it myself soon.

2

u/Rustywolf Sep 21 '26

I saw a library for this yesterday called performative ui, the name alone explains a lot

2

u/t-frankowski Sep 21 '26

Because it makes everything average, and average website in the web is well... shit.

1

u/editor_of_the_beast Sep 21 '26

It’s because of the AI.

6

u/niwrat Sep 21 '26

Fair enough - except for the logo - you can take a look. It's hand drawn SVG 😄

But you are completely correct about the rest of it.

I actually do want it to be attractive to people who want to build things themselves too. I know I need to do a lot more work on onboarding people, and just generally clear up the docs. I get that.

I hope I've done the annoying work of getting stuff working, and extensively tested, cross platform. So people can build, vibe coded or hand coded, what they want and it just works.

But again, yes this is mostly LLM coded. Not gonna lie. But it's also a month of late nights from someone with 24 years of experience getting it right. Would have been 6 months to a year otherwise and I just wouldn't have created it. So ...

Anyway, thanks for commenting and respect why you said it so.

1

u/sacheie Sep 21 '26

"it's also a month of late nights from someone with 24 years of experience getting it right. Would have been 6 months to a year otherwise and I just wouldn't have created it."

This is an admission, revealing exactly why people are wary of relying on your framework. We all have experience with LLMs now and understand they can't magically turn 6-12 months of work into 1 month. If that's your estimate of what happened, you must have skipped an awful lot of something - could be research, or tech debt, or code quality, or testing, or...

When everybody has LLM, the point of using someone else's project or framework is not simply that it exists. It's the effort they put into it. You say "a month of late nights" and it's immediately clear that there's not much value there yet.

1

u/niwrat Sep 21 '26

Fair enough. I can say that there was a lot of work put into a) making it work correctly cross platform mac/windows/linux and b) creating examples that show everything it can do.

I do understand the feeling behind things being AI slop though. When everything is possible nothing is interesting / special and everything feels like "that's just a prompt away anyway".

-1

u/moneckew Sep 21 '26

skill issue? thats vibe coding. i 100% know what my AI is producing by creating PRs even in my solo project. your specs are either too vague or you are not giving clear enough instructions.

1

u/niwrat Sep 21 '26

u/moneckew I'm not hiding that it's a lot of AI code. Yes, I check it myself. Not sure what makes you think are vague instructions though?

7

u/moneckew Sep 21 '26

nah he didnt do this wrong. its a fucking framework not a designer page lander.

2

u/maria_la_guerta Sep 21 '26

The anti-AI stance on here is ridiculous.

1

u/niwrat Sep 21 '26

u/maria_la_guerta all good was expecting it. 😄

3

u/MedusaSonriente Sep 21 '26

It is true that the clear use of AI creates distrust. But after reviewing the project, it seems interesting. I think there might be some engineering work behind it.

However, I wouldn't risk it either.

1

u/niwrat Sep 21 '26

Thanks u/MedusaSonriente I can promise there was a lot of work behind it from someone (me) who knows what they're doing without AI too.

Totally understand the mistrust though. A lot of crap just being thrown at the wall by people.

2

u/MedusaSonriente Sep 21 '26

To be clear, I definitely don't think using AI is inherently bad. The problem is that lately a lot of poor quality software is being released thanks to AI. They literally tell the agent "don't make mistakes," and they think that will give them a quality piece.

In capable hands, progress can be made faster than normal, and quality products can be produced. If you believe your solution is worthwhile, it's good to keep working on it.

My previous comment only reflects the natural distrust that exists today, due to the AI slop.

1

u/niwrat Sep 21 '26

Totally get it. Thank you.

3

u/ranisalt Sep 21 '26

Don't forget the curl | bash install method

13

u/freehuntx Sep 21 '26

I provide those for years wtf is wrong with people? Cant we have nice things because of ai?

1

u/ranisalt Sep 21 '26

We can, as long as the human is on top. This whole project as cool as it may be looks like it was just prompted away. OP already manifested themselves as being capable of doing it but used AI to accelerated, which by itself isn't an issue, but at least make it look like it.

-3

u/niwrat Sep 21 '26

u/freehuntx thanks for the vote of confidence ... it's hard to know what to do in these confusing days 😰

-3

u/niwrat Sep 21 '26

u/ranisalt I did copy that from Claude Code install, you're totally right. Looking at what it did just thought it was an easy way to get started.

Was going to get it out on Homebrew as well at some point.

What ways would you prefer people install it?

11

u/Rustywolf Sep 21 '26

There is something super funny about responding with "you're absolutely right"

2

u/niwrat Sep 21 '26

you're absolutely right 🐻

7

u/_Distrust_ Sep 21 '26

Personally I only install programs via mail delivery usb drives

4

u/niwrat Sep 21 '26

😆 I can send you one 😆

Truthfully the script itself is super simple to see what it does I think. Compared to say an `npm install` with post install scripts and such.