Skip to content

Cannot bind native functions #820

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

Closed
eholk opened this issue Aug 13, 2011 · 2 comments
Closed

Cannot bind native functions #820

eholk opened this issue Aug 13, 2011 · 2 comments

Comments

@eholk
Copy link
Contributor

eholk commented Aug 13, 2011

native "rust" mod rustrt {
    fn task_yield();
}

fn main() { bind rustrt::task_yield(); }

This fails with the error message upcall fail 'LHS of bind expr didn't have a function type?!', ../src/comp/middle/typeck.rs:2065.

@marijnh
Copy link
Contributor

marijnh commented Aug 15, 2011

The calling convention for rust functions and native functions is different, so to support this (which I think we should) we'll have to generate an adaptor function for natives that have their value taken.

@eholk
Copy link
Contributor Author

eholk commented Aug 15, 2011

I think Rust already creates an adapter function for native functions. At least, I'm pretty sure I saw one when I was poking through the debugger the other day.

@ghost ghost assigned marijnh Aug 30, 2011
@marijnh marijnh closed this as completed in f3edf8d Sep 7, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Run s390x tests on qemu system

qemu in user mode cannot run binaries produced by rustc (it hangs), so we run the tests in a fully virtualized s390x machine using qemu-system-s390x.

Some constants had to be fixed.
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

2 participants