about summary refs log tree commit diff
path: root/src/doc/trpl/ffi.md
AgeCommit message (Collapse)AuthorLines
2015-11-19src/doc/trpl -> src/doc/bookSteve Klabnik-629/+0
The book was located under 'src/doc/trpl' because originally, it was going to be hosted under that URL. Late in the game, before 1.0, we decided that /book was a better one, so we changed the output, but not the input. This causes confusion for no good reason. So we'll change the source directory to look like the output directory, like for every other thing in src/doc.
2015-11-17Mention libc from crates.io in TRPL: FFISteve Klabnik-0/+17
Fixes #29762
2015-08-28Be explicit about using crates.io's libc crateSteve Klabnik-3/+5
Fixes #28053
2015-08-06Add opaque structs to TRPL:FFISteve Klabnik-0/+53
Fixes #27303
2015-07-21rust -> RustTicki-4/+4
2015-07-06FFI panic is UBSteve Klabnik-13/+4
I incorrectly stated that it's an abort.
2015-06-24Replace std::comm reference with std::sync::mpsc.Brody Holden-2/+2
The FFI documentation references std::comm. Replace with std::sync::mpsc. Also wrap the line.
2015-06-20TRPL: FFI: address panicsSteve Klabnik-0/+34
Fixes #26443
2015-06-10Rollup merge of #26146 - steveklabnik:remove_unsafe_pointer, r=GankroManish Goregaokar-2/+2
Using two terms for one thing is confusing, these are called 'raw pointers' today.
2015-06-09Exise 'unsafe pointer' in favor of 'raw pointer'Steve Klabnik-2/+2
Using two terms for one thing is confusing, these are called 'raw pointers' today.
2015-06-09Clarify confusing sentence in TRPL: FFISteve Klabnik-2/+4
After talking with @graydon on #rust-internals, this is hopefully clarifying. Fixes #25586
2015-05-18TRPL: Add `rust` Marker to Some Code BlockPascal Hertleif-6/+6
This adds strictly more information to the source files and reduces the need for customized tooling to render the book. (While this should not change the output of _rustbook_, it is very useful when rendering the sources with external tools like Pandoc.)
2015-04-15Grammar fixBrett Cannon-1/+1
"as an library" -> "as a library"
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-2/+2
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-2/+2
Now that support has been removed, all lingering use cases are renamed.
2015-03-26New section of the book: nightly rustSteve Klabnik-25/+0
Now that feature flags are only on nightly, it's good to split this stuff out.
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+8
2015-03-19Reference Drop in FFI chapterSteve Klabnik-0/+2
Fixes #22002
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2015-02-18rollup merge of #22484: riginding/masterAlex Crichton-1/+1
2015-02-18std: Implement CString-related RFCsAlex Crichton-2/+2
This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type to the module. [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md The new `CStr` type is only constructable via two methods: 1. By `deref`'ing from a `CString` 2. Unsafely via `CStr::from_ptr` The purpose of `CStr` is to be an unsized type which is a thin pointer to a `libc::c_char` (currently it is a fat pointer slice due to implementation limitations). Strings from C can be safely represented with a `CStr` and an appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr` instead to allow producers to pass in C-originating strings instead of just Rust-allocated strings. A new constructor was added to `CString`, `new`, which takes `T: IntoBytes` instead of separate `from_slice` and `from_vec` methods (both have been deprecated in favor of `new`). The `new` method returns a `Result` instead of panicking. The error variant contains the relevant information about where the error happened and bytes (if present). Conversions are provided to the `io::Error` and `old_io::IoError` types via the `FromError` trait which translate to `InvalidInput`. This is a breaking change due to the modification of existing `#[unstable]` APIs and new deprecation, and more detailed information can be found in the two RFCs. Notable breakage includes: * All construction of `CString` now needs to use `new` and handle the outgoing `Result`. * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call. * The `as_slice*` methods have been removed in favor of just having the `as_bytes*` methods. Closes #22469 Closes #22470 [breaking-change]
2015-02-18Fixed link in ffi documentationRyan Riginding-1/+1
2015-02-16Fix grammarManish Goregaokar-1/+1
2015-02-13Enhance static mut example in FFI chapter.Steve Klabnik-4/+11
Fixes #9980
2015-01-17Fix more rollup problemsSteve Klabnik-0/+1
2015-01-17Add C -> Rust example to FFI chapter of the book.Steve Klabnik-28/+46
Fixes #10489.
2015-01-17Fix up titles of TRPL chaptersSteve Klabnik-1/+1
2015-01-17Intpocalypse, book edition.Steve Klabnik-4/+4
Fix all usage of int/uint/i/u in the book.
2015-01-17Remove segmented stack info from the FFI chapter of the book.Steve Klabnik-23/+0
Fixes #20071.
2015-01-15rollup merge of #21105: csouth3/kill-box-importAlex Crichton-2/+0
Closes #21093. r? @steveklabnik cc @alexcrichton I tested with `make check-docs` and this passes that. Hope that was enough.
2015-01-13Remove unneeded box import in examplesChase Southwood-2/+0
2015-01-12Purge references to Rust tasks from TRPL.Paul Crowley-7/+6
2015-01-08Standardize punctuation & formatting of TRPLKevin Yap-1/+1
This commit is an attempt to standardize the use of punctuation and formatting in "The Rust Programming Language" as discussed in #19823. - Convert bold text to italicized textcwhen referring to terminology. - Convert single-quoted text to italicized or double-quoted text, depending on context. - Use double quotes only in the case of scare quotes or quotations.
2015-01-08Fix dead links in the guide and reorganizeAlex Crichton-0/+546