archseer / enigma

An Erlang VM implementation in Rust
Mozilla Public License 2.0
1.05k stars 40 forks source link

Multiple build errors #36

Closed yima77 closed 5 years ago

yima77 commented 5 years ago

When I ran "cargo run", once it got into compiling enigma, it encountered multiple errors, such as:

error[E0432]: unresolved import byteorder
--> src/etf.rs:313:5
|
313 | use byteorder::{BigEndian, WriteBytesExt};
| ^^^^^^^^^ help: a similar path exists: libflate::byteorder

error[E0433]: failed to resolve: use of undeclared type or module md5
--> src/bif/erlang.rs:14:18
14 let digest = md5::compute(bytes); ^^^ use of undeclared type or module md5 error[E0599]: no method named write_u8 found for type &mut std::vec::Vec<u8> in the current scope --> src/etf.rs:330:21
330 res.write_u8(i as u8)?;
^^^^^^^^
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
        `use byteorder::io::WriteBytesExt;`                                   

The last error occurs on multiple lines in etf.rs.

In addition, many warning about unused import and macro definition, such as:

warning: unused macro definition
--> src/exception.rs:208:1
|
208 | / macro_rules! native_exception { 209 | | ($x:expr) => {
210 | | $x & Reason::EXFNATIVE 211 | | };
212 | | }
| |
^

warning: unused import: BigInt
--> src/bif.rs:11:26
11 use crate::value::{self, BigInt, Cons, Term, CastFrom, CastInto, Tuple, Variant}; ^^^^^^

= note: #[warn(unused_imports)] on by default

And warnings about deprecated features, such as:

warning: ... range patterns are deprecated --> src/bif/erlang.rs:230:51 230 Variant::Integer(i @ 0...255) => { ^^^ help: use ..= for an inclusive range
= note: #[warn(ellipsis_inclusive_range_patterns)] on by default                                  
                                                                     warning: trait objects without an explicit `dyn` are deprecated

--> src/ets/error.rs:88:32
|
88 | fn cause(&self) -> Option<&StdError> { | ^^^^^^^^ help: use dyn: dyn StdError

archseer commented 5 years ago

Sorry about that, I've just pushed https://github.com/archseer/enigma/commit/ff257d5420db81a29521852751ff03c90c41414f which adds the missing deps. I've had them in the transform-engine branch but forgot to cherry-pick into master.

yima77 commented 5 years ago

Build was successful after pulling in the new crate "transform-engine".