plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 175 forks source link

Remove JazzLib requirement #351

Closed jvilk closed 8 years ago

jvilk commented 9 years ago

We currently include JazzLib in the DoppioJCL to avoid needing to implement zip file natives. However, we could implement these natives using the zip file support in BrowserFS, making JAR file extraction much quicker.

Since DoppioJVM runs in both Node and the browser, I would need to separate the zip support into a separate environment-agnostic library, and update BrowserFS and Doppio to reference this library.

perimosocordiae commented 9 years ago

When we initially settled on using JazzLib, we'd tried to implement the required natives for zip support in Javascript. The problem with that plan is that the natives are highly coupled to java.util.zip's implementation, so using a pre-existing JS zip lib was out of the question.

I think we should trap the higher-level public methods from java.util.zip and use a JS library (maybe the one derived from BrowserFS) to handle them.

jvilk commented 9 years ago

I looked at JamVM's implementation of zip, and it looks like the natives are pretty straightforward. We shall see...

perimosocordiae commented 9 years ago

I did some archaeology and found the commit where we switched to JazzLib in the first place: https://github.com/plasma-umass/doppio/commit/73d50aaf87fc5c1bbf4bb08898c286c51a84d7df

Amazingly, the old hacky code did work for some limited cases.

perimosocordiae commented 9 years ago

Haha, I forgot: it only worked if the jar was "classes.jar", which we manually unzipped in the build process. Good times.

jvilk commented 8 years ago

We no longer rely on JazzLib.