Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not build with rust 1.2.0 #1

Open
zjhmale opened this issue Aug 24, 2015 · 3 comments
Open

can not build with rust 1.2.0 #1

zjhmale opened this issue Aug 24, 2015 · 3 comments

Comments

@zjhmale
Copy link

zjhmale commented Aug 24, 2015

after i run

cargo build

it shows the compiler errors

src/vm.rs:144:30: 144:36 error: illegal suffix `u` for numeric literal
src/vm.rs:144 static VM_MAX_SLOTS : uint = 64000u;
                                           ^~~~~~
src/vm.rs:144:30: 144:36 help: the suffix must be one of the integral types (`u32`, `isize`, etc)
src/execute.rs:30:1: 30:2 error: macros that expand to items must either be surrounded with braces or followed by a semicolon
src/execute.rs:30 )
                  ^
src/builtin.rs:11:21: 11:23 error: illegal suffix `u` for numeric literal
src/builtin.rs:11      vm.slots.store(0u, Nil);
                                      ^~
src/builtin.rs:11:21: 11:23 help: the suffix must be one of the integral types (`u32`, `isize`, etc)
error: aborting due to 3 previous errors
Could not compile `clojit-vm`.

maybe we can rewrite the vm

@zjhmale
Copy link
Author

zjhmale commented Aug 24, 2015

after fixed some illegal suffix 'u' for numeric literal issues i found the execute macro is the real problem

@gandro
Copy link
Member

gandro commented Aug 24, 2015

Thank you for your interest. Unfortunately, this tree has not been updated by us in over a year. As stated in the README, you need a Rust compiler nightly from roughly around a year ago (August 2014) to build this project. Much has changed in the Rust language since, and it would require more work than fixing a macro to make this build on stable Rust: Dealing with the rename of {int,uint} to {isize,usize}, switch to the rustc serialize crate, using wrapped integer arithmetic in some places etc.

However, while this could be done, we probably won't take the time to update this repository to a newer version of Rust any time soon. In fact, we are uncertain about the Rust version and are currently rewriting the virtual machine in C, as it allows us to make better use of the Memory Pool System garbage collector, see clojit-cvm for an early prototype.

@nickik
Copy link
Member

nickik commented Aug 24, 2015

Just to add to gandro, we are always arguing if we should keep doing Rust of switch to C. Both have some major advantages and massiv drawbacks.

I am currently more focused on makeing the C VM. I would like to have it at least as far as this version written in rust is.

In the project rust-mps-obj (https://github.com/clojit/rust-mps-obj ) we have tried to make the Memory Pool System work together with Rust and build a nice abstraction around the Unsafe parts. In theory this could all work really well but we encounter a lot of practical problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants