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 characters
/// The Promise type. Can provide the value of a Future | |
pub struct Promise<A> (ChanOne<A>); | |
impl<A:Send> Promise<A> { | |
pub fn fulfill(&mut self, v: A) { | |
(*self).send(v); | |
} | |
} |
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 characters
use std::io::println; | |
use std::result::{Result, Ok}; | |
use std::task::{spawn}; | |
pub struct Foo(int); | |
pub trait Bar { | |
fn baz(&self); | |
} |
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 characters
/home/jeff/src/rust/src/libstd/rt/uv/uvio.rs:312:27: 312:77 error: failed to find an implementation of trait ~rt::rtaio::RtaioTcpStreamAsync:Send for rt::uv::uvaio::UvTcpStreamAsync | |
/home/jeff/src/rust/src/libstd/rt/uv/uvio.rs:312 Ok(_) => cb(Ok(~UvTcpStreamAsync(watcher) as ~RtaioTcpStreamAsync)), | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
error: aborting due to previous error |
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 characters
jeff@mbp:~/src/rust/build$ make check-stage1-extra | |
cfg: build triple x86_64-unknown-linux-gnu | |
cfg: host triples x86_64-unknown-linux-gnu | |
cfg: target triples x86_64-unknown-linux-gnu | |
cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu | |
cfg: using gcc | |
cfg: no pandoc found, omitting docs | |
cfg: no llnextgen found, omitting grammar-verification | |
cfg: no pandoc found, omitting library doc build |
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 characters
jeff@mbp:~/src/sandbox$ rustc newsched_timer.rs | |
newsched_timer.rs:4:4: 4:19 warning: unused import [-W unused-imports (default)] | |
newsched_timer.rs:4 use std::option::*; | |
^~~~~~~~~~~~~~~ | |
error: linking with `cc` failed with code 1 | |
note: cc arguments: -L/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o newsched_timer newsched_timer.o -L/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-6c65cf4b443341b1-0.8-pre -lrustrt -lrt -lpthread -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../../lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/jeff/lib/rustc/x86_64-unknown-linux-gnu/lib | |
note: newsched_timer.o: In function `main::_b34d73d589378df4::_0$x2e0': | |
newsched_timer.rc:(.text+0x69): undefined reference to `rt::io::timer::__extensions__::meth_29117::init::_5139afb69d2758a::_0$x2e8$x2dpre' | |
collect2: error: ld returned 1 exit status |
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 characters
https://github.com/mozilla/rust/issues/6435 | |
14:05 < ecr> olsonjeffery: it'd involve | |
- designing an RtioTimer interface in std::rt::rtio.rs, | |
- implementing Timer in std::rt::io on top of it, | |
- implementing RtioTimer for TimerWatcher in std::rt::uv::uvio.rs | |
14:09 < ecr> olsonjeffery: and you might want to look at the libuv timer interface as well to see if there's any additional functionality that still needs bindings (which would | |
give you the bottom layer of newsched I/O in std::rt::uv::uvll.rs). | |
14:12 <ecr> if I'm not responding in IRC, try email ([email protected]). |
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 characters
jeff@mbp:~/src/rust/build$ find ../src/rt/ -name '*.cpp' -exec grep '.->malloc' -H -n {} \; | |
../src/rt/rust_builtin.cpp:98: rust_rng *rng = (rust_rng *) task->malloc(sizeof(rust_rng), | |
../src/rt/rust_stack.cpp:61: stk_seg *stk = (stk_seg *)region->malloc(total_sz, "stack"); | |
../src/rt/rust_stack.cpp:78: stk_seg *stk = (stk_seg *)exchange->malloc(total_sz); | |
../src/rt/rust_uv.cpp:40: void* ptr = rust_get_current_task()->kernel->malloc(size, tag); | |
../src/rt/boxed_region.cpp:22: (rust_opaque_box*)backing_region->malloc(total_size, "@"); |
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 characters
unsafe fn get_list(p: &Path) -> ~[~str] { | |
use libc::{DIR, dirent_t}; | |
use libc::{opendir, readdir, closedir}; | |
extern mod rustrt { | |
unsafe fn rust_list_dir_val(ptr: *dirent_t) | |
-> *libc::c_char; | |
} | |
let input = p.to_str(); | |
let mut strings = ~[]; | |
let input_ptr = ::cast::transmute(&input[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 characters
../configure --target-triples=x86_64-apple-darwin,i686-apple-darwin --disable-optimize --disable-optimize-cxx |
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 characters
find . -name '*.cpp' -exec grep '.->malloc' -H -n {} \; |