libarchivejs icon indicating copy to clipboard operation
libarchivejs copied to clipboard

Can use by nodejs?

Open mondy opened this issue 5 years ago • 8 comments

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.

mondy avatar Nov 01 '19 07:11 mondy

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

nika-begiashvili avatar Nov 01 '19 11:11 nika-begiashvili

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

mondy avatar Nov 02 '19 20:11 mondy

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. 😂

wachidmudi avatar Nov 05 '19 08:11 wachidmudi

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

btzr-io avatar Nov 10 '19 19:11 btzr-io

@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

nika-begiashvili avatar Nov 11 '19 17:11 nika-begiashvili

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 ?

btzr-io avatar Nov 11 '19 17:11 btzr-io

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

nika-begiashvili avatar Nov 12 '19 07:11 nika-begiashvili

Could you upload your experiment to a separate branch here?

drola avatar Nov 21 '19 04:11 drola

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

nika-begiashvili avatar Jan 24 '24 15:01 nika-begiashvili