about summary refs log tree commit diff
path: root/doc/tutorial-ffi.md
AgeCommit message (Collapse)AuthorLines
2014-01-05Convert sub tutorials into Guides #10838Alan Andrade-430/+0
Ensure configure creates doc/guides directory Fix configure makefile and tests Remove old guides dir and configure option, convert testing to guide Remove ignored files Fix submodule issue prepend dir in makefile so that bor knows how to build the docs S to uppercase
2013-12-15std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].Huon Wilson-5/+5
2013-12-15Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}.Huon Wilson-2/+2
2013-12-09Add some more commentary to FFI tutorial.Edward Z. Yang-9/+26
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-02Bring the linkage documentation up-to-dateAlex Crichton-19/+84
This includes documentation for all the previous changes done to linking in #10582. Additionally, this brings the list of feature-gates up-to-date with the currently recognized list of features.
2013-11-14doc: Fix example on Windowsklutzy-1/+1
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-143/+25
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-09Add a "system" ABIAlex Crichton-3/+20
This adds an other ABI option which allows a custom selection over the target architecture and OS. The only current candidate for this change is that kernel32 on win32 uses stdcall, but on win64 it uses the cdecl calling convention. Otherwise everywhere else this is defined as using the Cdecl calling convention. cc #10049 Closes #8774
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-1/+1
2013-10-14Remove unused abi attributes.Steve Klabnik-7/+4
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-10Fixed typo under 'Segmented stacks and the linter', and removed superfluous ↵Michael 'devbug' Williams-7/+7
trailing whitespace.
2013-09-16switch Drop to `&mut self`Daniel Micay-1/+1
2013-08-22Update FFI tutorial to reference `c_str::to_c_str`Kevin Ballard-3/+2
The FFI tutorial still incorrectly stated that strings were terminated with \0 and suggested using `str::as_c_str`.
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+141
2013-08-07Add some documentation about globals in ffi docsAlex Crichton-0/+42
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-2/+2
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-25Change finalize -> drop.Luqman Aden-1/+1
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-4/+4
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-05-31fix tutorial lint warningsDaniel Micay-2/+1
2013-05-31mv the raw pointer {swap,replace}_ptr to std::ptrDaniel Micay-1/+1
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2
2013-05-23more testing fallout from core->std/std->extra moveTed Horst-6/+6
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-1/+2
2013-05-10Fix tests with the swap operatorAlex Crichton-1/+3
2013-05-08fix incorrect region code based on the old 'selfDaniel Micay-7/+7
also removes unnecessary casts from the RcMut implementation
2013-05-04small fix to the tutorial-ffi destructor exampleDaniel Micay-7/+4
The previous example was erroneously attempting to destroy uninitialized memory, which was often zeroed (masking the bug).
2013-04-26tutorial-ffi: add example of a custom destructorDaniel Micay-0/+68
2013-04-12auto merge of #5852 : thestinger/rust/ffi, r=thestingerbors-4/+5
2013-04-12tutorial-ffi: add another missing wordDaniel Micay-4/+5
2013-04-12tutorial-ffi: add missing wordDaniel Micay-2/+2
2013-04-12rewrite the ffi tutorial with snappy as an exampleDaniel Micay-195/+139
The example with OpenSSL is incorrect, because OpenSSL is using a static variable for the return value and isn't thread-safe. The gettimeofday example isn't great because it's not very portable.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-1/+1
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-1/+1
2013-03-02librustc: Forbid chained imports and fix the logic for one-level renaming ↵Patrick Walton-2/+2
imports
2013-02-26doc: Remove references to mut fields. rs=demutingPatrick Walton-7/+7
2013-01-23doc: fix tutorial unsafe blocks, r=burningtree.Graydon Hoare-12/+17
2013-01-21Revert "doc: Fix tutorial-ffi xfail-tests and update SHA1() to use size_t"Tim Chevalier-24/+16
This reverts commit 50c8cbb25aeb9d8132ac06914e9978d3cddb7f42.
2013-01-20doc: Fix tutorial-ffi xfail-tests and update SHA1() to use size_tChris Peterson-16/+24
2012-12-23Fix example.Eric J. Holmes-3/+3
2012-10-11Fix tutorial-ffi testsTim Chevalier-4/+4
2012-10-09Copyedit FFI tutorialTim Chevalier-66/+65
2012-10-03Revert "docs: Call () 'unit' instead of 'nil'"Brian Anderson-1/+1
This reverts commit c8ee49a5b68ad0b0a33eb30e757fadb0be47f8da.
2012-10-03docs: Call () 'unit' instead of 'nil'Brian Anderson-1/+1
2012-10-01Move over to calling ptr::addr_ofTim Chevalier-1/+1
Everything should now call ptr::addr_of instead of ptr::p2::addr_of. Only the pipes macro code when compiled by stage0 will call ptr::p2::addr_of. Needs a snapshot to get rid of that.
2012-09-26docs: Give all tutorials consistent titles and intro sectionsBrian Anderson-7/+9
2012-09-26tutorial: Remove all references to 'records'. MiscBrian Anderson-6/+12
2012-09-21Install new pub/priv/export rules as defaults, old rules accessible under ↵Graydon Hoare-2/+6
#[legacy_exports];
2012-09-15docs: Make supplemental tutorials testableBrian Anderson-8/+8
2012-09-05doc: "import" -> "use"Patrick Walton-4/+4
2012-09-05doc: Split out the FFI part of the tutorialPatrick Walton-0/+240
The tutorial should perhaps contain an FFI section, but this one is too long.