princjef / regex-rust

A regular expression library implemented natively in Rust using Pike VM
MIT License
2 stars 0 forks source link

Compiling into external library for use #4

Closed clgy15 closed 10 years ago

clgy15 commented 10 years ago

In working on benchmarking our regular expression library in comparison to others, I have discovered somewhat of an unfortunate side effect of working on a beta software. The original structure of our codebase was designed to be used with rustpkg which was the package manager for rust versions 0.9 and previous. However its been depreciated. What's more, 0.1 and nightly both have issues with our macro implementations. Details still forthcoming.

Essentially its a whole mess. What's more the compilation flags have changed since 0.9, the --lib option has also been depreciated. I am working of fixing our makefile to work in the new system, but realize that we would all have to push up to the 0.1 compiler or newer when I push it.

Rust sucks. Do you want me to "future proof" the library? I still have yet to successfully create a working library that I can use in a line like..... extern mod regex or similar.

princjef commented 10 years ago

I think targeting 0.10 is a reasonable goal, since it is the earliest possible version the library might actually be used in. Upgrading our compilers will be a pain, but we probably should have honestly done it before we started this project. Since there are no other assignments left in the class, there should be no reason why we need 0.9 going forward.

I was worried that the macros might cause some problems, since they are hidden by a feature/unstable flag in 0.9. The good news is that I don't believe any of our core functionality is dependent on macros (mostly testcases as far as I can tell). I think we can refactor that into static functions that accomplish the same goal without too much trouble (then again, I've been wrong about that before...).

princjef commented 10 years ago

Oh I just realized that 0.10 has actually been released, so we're targeting 0.11 (or 1.0, whichever is coming next). Either way, I think installing the 0.10 compiler is the right way to go. Nightly is probably not worth it at this point, though might be worth trying once we get to the point where we're integrating into the compiler and the actual release.

And there are binaries now! There are Linux binaries and Mac installers for 0.10, so the process of installing that shouldn't be too painful. Here's the release:

https://mail.mozilla.org/pipermail/rust-dev/2014-April/009387.html

clgy15 commented 10 years ago

Yes Binaries are available makes it easy. Okay then I'll refactor the test cases, compile down for 0.1 (The nightly is the pre alpha on 0.11), and finally get extern mod working.... Ill be back in a while. Ha

clgy15 commented 10 years ago

Oh and apparently extern mod is deprecated as well.... God I hate beta software

clgy15 commented 10 years ago

Oh and pretty much everything else is deprecated..... this may be a restructuring for the ages here.......

clgy15 commented 10 years ago

Extra is no longer a crate either.... What on earth.

clgy15 commented 10 years ago

Actually Jeff, If what I see is correct. We have a much deeper issue to upgrade to 0.1. Can you attempt to run the test suite with the new compiler? I can't get to that point, Im getting every error and its children.