Created
November 11, 2013 06:16
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ all: libfoo.dylib bar.c clang bar.c -o bar -L. -lfoo -Wl,-rpath,`pwd` libfoo.dylib: foo.rs rustc --lib foo.rs ln -nsf libfoo-*.dylib libfoo.dylib This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ void foo(); void factory(); struct { int version; void *entry_data; int entry_len; void *children_data; int children_len; void *f; } _rust_crate_map_toplevel = { 2, 0, 0, 0, 0, factory }; int main() { foo(); return 0; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ extern mod rustuv; use std::rt; use std::rt::rtio::EventLoop; use std::ptr; #[no_mangle] pub extern "C" fn factory() -> ~EventLoop { rustuv::uvio::new_loop() } #[no_mangle] pub extern "C" fn foo() { do rt::start(0, ptr::null()) { println!("hello"); }; }