when I reference that crate in my project and run cargo bulid or cargo run I get an error that extern crate syntax; cannot be found.
error[E0463]: can't find crate for `syntax`
--> /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.22.1/src/lib.rs:10:1
|
10 | extern crate syntax;
| ^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `aster`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Can anyone else check that crate works for them or tell me what I'm doing wrong with my project setup?
I'm pretty sure the syntax crate is (was?) the compiler's internal parser. This was never stable to begin with. So it doesn't suprise me this doesn't build (it's a 4 year old unmaintained crate that you are trying to build).
If you're interested in updating it (and either forking / releasing, or just using it internally), it looks like there's one main "bad" dependency. The serde_macros version 0.7 crate is probably what's depending on syntax. If the serde and serde_json dependencies were updated to 1.0, and serde_macros replaced with serde_derive 1.0, then I imagine it should compile. I think all the other dependencies were always buildable on stable rust, so they should still build.
It would be a good idea to also update log to 0.4 (not a big change) and replace hyper with reqwest 0.10 (a bigger change), but those two shouldn't be necessary just to compile.
Ah darn- I guess the older openssl crate versions probably depend on having openssl headers available on the system. I know the newer versions will bundle them in if you don't have OpenSSL headers installed, but maybe not older ones.
If you're on a linux or macos and can install openssl-dev or similar, then you could try that- otherwise I think you will probably need to update hyper, which is what's depending on the old version of OpenSSL.
The problem with updating hyper though is that at around 0.11, I think, they became an async http library and radically changed most of their APIs. So it'll probably be easier to switch to a different up-to-date blocking client than try to update hyper directly. reqwest::blocking is one I know of which uses hyper internally. Probably also need to bump url from 1.0 to 2.0 to go along with that. It's more involved than updating serde, but it still should be possible?