Graham Fawcett
7ddd353ef6
implement #[nolink]; deprecate #[link_name = ""]; note in stdlib to remove empty link_name.
...
Can't remove them from stdlib until the snapshotted compiler supports #[nolink].
2011-12-16 15:29:59 -08:00
Marijn Haverbeke
fedb775fbb
Add hacks to extract and compile tutorial code
...
Not included in the build by default, since it's fragile and kludgy. Do
something like this to run it:
cd doc/tutorial
RUSTC=../../build/stage2/bin/rustc bash test.sh
Closes #1143
2011-11-22 16:12:23 +01:00
Haitao Li
f4eb25e0d0
tutorial: Fix type mismatch in example FFI code
...
Compile error:
time.rs:13:23: 13:43 error: mismatched types: expected
*R[tv_sec=mMltv_usec=mMl] but found *R[tv_sec=Mltv_usec=Ml] (record
elements differ in mutability)
time.rs:13 libc::gettimeofday(std::ptr::addr_of(x),
std::ptr::null());
^~~~~~~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x9dfd178 root task failed
2011-11-17 22:50:08 +08:00
Brian Anderson
9b89b0cffd
Update tutorial for native mod changes
2011-11-16 12:16:36 -08:00
Haitao Li
5665308d8c
tutorial: Update with native module syntax change
2011-11-16 11:35:14 -08:00
Marijn Haverbeke
0898d441cb
Use libcrypto.so instead of libssl.so in the ffi part of tutorial
2011-11-15 13:53:03 +01:00
Marijn Haverbeke
0a20eed2db
Make ptr::addr_of return an immutable vec, add mut_addr_of
2011-11-02 12:20:12 +01:00
Marijn Haverbeke
eabc9f2295
Fix some typos in tutorial
2011-11-01 22:11:55 +01:00
Marijn Haverbeke
11999351e0
Fill in the foreign-function part of the tutorial
2011-11-01 17:35:18 +01:00
Marijn Haverbeke
aa01876c95
Flesh out the module section of the tutorial
2011-11-01 14:38:55 +01:00