nika-begiashvili / libarchivejs

Archive library for browsers
MIT License
288 stars 35 forks source link

Can use by nodejs? #16

Closed mondy closed 10 months ago

mondy commented 5 years ago

Hi.

Are there any plans to make it available on nodejs?

I think so, If it wasm, porting to nodejs is easy. But I'm not sure.

I hope it can be used by nodejs.

nika-begiashvili commented 5 years ago

Hi, I'm wanted this to work with nodejs from the start but unfortunately issue lies within WebWorkers not webassembly, API is too different to handle both my plan was to use https://github.com/GoogleChromeLabs/comlink which works with worker_threads as well but unfortunately I'm not able to make it work for now I would appreciate help

mondy commented 5 years ago

Thanks for reply. I don't understand this library in detail yet. So I couldn't help you. I'm sorry.

wachidmudi commented 5 years ago

Yeah, my first thought of this library is that it can be used inside nodejs only, but it really need a WebWorkers that lies within a browser. Just bear with it for now. 😂

btzr-io commented 5 years ago

On nodejs you can use libarchive directly by creating a build or use the c++ bindings.

This repository looks unmaintained but it can help: https://github.com/skomski/node-archive

nika-begiashvili commented 5 years ago

@btzr-io I agree that's probably best solution for now, but since that doesn't really produce portable package (you need to have libarchive on system) I'm still interested making libarchive.js available for nodejs

btzr-io commented 5 years ago

Not sure if is possible to use / integrate this but the api looks similar: https://nodejs.org/api/worker_threads.html you could switch to worker_threads if is on node...

Oh , I didn't see this message:

my plan was to use https://github.com/GoogleChromeLabs/comlink which works with worker_threads as well but unfortunately I'm not able to make it work for now

Whats the issue with comlink ?

nika-begiashvili commented 5 years ago

Not sure if is possible to use / integrate this but the api looks similar: https://nodejs.org/api/worker_threads.html you could switch to worker_threads if is on node...

Oh , I didn't see this message:

my plan was to use https://github.com/GoogleChromeLabs/comlink which works with worker_threads as well but unfortunately I'm not able to make it work for now

Whats the issue with comlink ?

honestly, it kinda doesn't work :D message doesn't go through unless you debug it, when you're debugging, it works as expected, need more time to investigate

drola commented 5 years ago

Could you upload your experiment to a separate branch here?

nika-begiashvili commented 10 months ago

Starting from v2.0.0 you can use libarchive.js in NodeJs !