nucleus-js / design

This repo is for the core design, discussion, spec, and tests for nucleus implementations.
Other
110 stars 20 forks source link

Re-implement duktape version using rust as glue code. #10

Closed creationix closed 8 years ago

creationix commented 8 years ago

https://twitter.com/creationix/status/740367352533909504

yoshuawuyts commented 8 years ago

Omg yes! - This gets me mad excited

fzzzy commented 8 years ago

Will this work occur on a branch?

fzzzy commented 8 years ago

I see that there is already rust code in master.

creationix commented 8 years ago

So I think these are the next steps. If anyone knows of a better plan of attack, let's talk about it.

  1. Replace miniz with a rust library and finally finish/fix zip writing from the binary.
  2. Replace read_from_zip, scan_from_zip, read_from_file, scan_from_file with rust.
  3. Replace main.c with main.rs by using existing duktape and libuv bindings for rust.

Step 3 is large and will obsolete half the code written in 1 and 2, so should we just jump straight to it?

Fishrock123 commented 8 years ago

@creationix Sounds like we should do number 3 first.

creationix commented 8 years ago

I've been doing some research. There are existing duktape and libuv bindings for rust already on crates.io, but they are not complete or updated recently.

I guess the next step is to write (or update/finish) rust bindings for the two languages. And start this as part of step 3 using our app as a way to manually test the integration.

ashleygwilliams commented 8 years ago

sounds like a good plan! a smaller first step is to get set up with cargo so that we're using rust via crates. thinking i might tackle that- thoughts?

creationix commented 8 years ago

I'll start a new implementation that's started as a rust bin. We can leave the mostly C folder alone for now.

creationix commented 8 years ago

I just added the rusty-duktape version. The main is just the sample from the getopts docs. A first step would be fixing that to use the nucleus CLI interface.

creationix commented 8 years ago

https://github.com/creationix/nucleus/pull/20

creationix commented 8 years ago

Depends on #24 and #24

Fishrock123 commented 8 years ago

https://github.com/nucleus-js/rustyduk