Searched +full:rust +full:- +full:src (Results 1 – 25 of 291) sorted by relevance
12345678910>>...12
/external/rust/cxx/book/src/ |
D | tutorial.md | 1 {{#title Tutorial — Rust ♡ C++}} 4 This example walks through a Rust application that calls into a C++ client of a 5 blobstore service. In fact we'll see calls going in both directions: Rust to C++ 6 as well as C++ to Rust. For your own use case it may be that you need just one 19 We'll use Cargo, which is the build system commonly used by open source Rust 22 Create a blank Cargo project: `mkdir cxx-demo`; `cd cxx-demo`; `cargo init`. 29 # name = "cxx-demo" 43 in a Rust module annotated with the `#[cxx::bridge]` attribute macro. 45 We'll open with just the following at the top of src/main.rs and walk through 48 ```rust,noplayground [all …]
|
D | index.md | 2 …src="https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github"… 5 # CXX — safe interop between Rust and C++ 7 This library provides a safe mechanism for calling C++ code from Rust and Rust 8 code from C++. It carves out a regime of commonality where Rust and C++ are 12 interface over unsafe C-style signatures. 19 of the types and function signatures to protect both Rust's and C++'s 34 In this example we are writing a Rust application that calls a C++ client of a 35 large-file blobstore service. The blobstore supports a `put` operation for a 40 ```rust,noplayground 43 extern "Rust" { [all …]
|
/external/rust/cxx/ |
D | README.md | 1 CXX — safe FFI between Rust and C++ 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/cxx-8da0cb?style=for-the-badge&… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/cxx.svg?style=for-the-badge&color=fc8d62… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-cxx-66c2a5?style=for-the-badge&labelC… 7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/cxx/CI/master?s… 9 This library provides a **safe** mechanism for calling C++ code from Rust and 10 Rust code from C++, not subject to the many ways that things can go wrong when 11 using bindgen or cbindgen to generate unsafe C-style bindings. 14 project, you would be on the hook for auditing all the unsafe Rust code and 16 just the C++ side would be sufficient to catch all problems, i.e. the Rust side [all …]
|
/external/rust/crates/syn/tests/repo/ |
D | mod.rs | 15 // Compile-fail expr parameter in const generic position: f::<1 + 2>() 16 "src/test/ui/const-generics/closing-args-token.rs", 17 "src/test/ui/const-generics/const-expression-parameter.rs", 20 "src/test/ui/issues/issue-13105.rs", 21 "src/test/ui/issues/issue-13775.rs", 22 "src/test/ui/issues/issue-34074.rs", 23 "src/test/ui/proc-macro/trait-fn-args-2015.rs", 26 "src/test/rustdoc-ui/test-compile-fail2.rs", 27 "src/test/rustdoc-ui/test-compile-fail3.rs", 28 "src/test/ui/include-single-expr-helper.rs", [all …]
|
/external/rust/crates/libm/ |
D | CONTRIBUTING.md | 3 - Pick your favorite math function from the [issue tracker]. 4 - Look for the C implementation of the function in the [MUSL source code][src]. 5 - Copy paste the C code into a Rust file in the `src/math` directory and adjust 6 `src/math/mod.rs` accordingly. Also, uncomment the corresponding trait method 7 in `src/lib.rs`. 8 - Write some simple tests in your module (using `#[test]`) 9 - Run `cargo test` to make sure it works 10 - Run `cargo test --features musl-reference-tests` to compare your 12 - Send us a pull request! Make sure to run `cargo fmt` on your code before 15 - :tada: [all …]
|
/external/rust/cxx/book/src/binding/ |
D | str.md | 1 {{#title rust::Str — Rust ♡ C++}} 2 # rust::Str 7 // rust/cxx.h 12 # namespace rust { 20 // Throws std::invalid_argument if not utf-8. 53 # } // namespace rust 58 **Be aware that rust::Str behaves like &str i.e. it is a borrow!** C++ 61 Just to reiterate: &str is rust::Str. Do not try to write &str as `const 62 rust::Str &`. A language-level C++ reference is not able to capture the fat 73 ```rust,noplayground [all …]
|
D | string.md | 1 {{#title rust::String — Rust ♡ C++}} 2 # rust::String 7 // rust/cxx.h 12 # namespace rust { 21 // Throws std::invalid_argument if not utf-8. 60 # } // namespace rust 70 ```rust,noplayground 71 // src/main.rs 82 fn concat(r: ConcatRequest) -> String; 99 #include "example/src/main.rs.h" [all …]
|
D | slice.md | 1 {{#title rust::Slice<T> — Rust ♡ C++}} 2 # rust::Slice\<const T\>, rust::Slice\<T\> 4 - Rust `&[T]` is written `rust::Slice<const T>` in C++ 5 - Rust `&mut [T]` is written `rust::Slice<T>` in C++ 10 // rust/cxx.h 15 # namespace rust { 56 # T *operator->() const noexcept; 61 # iterator &operator--() noexcept; 62 # iterator operator--(int) noexcept; 65 # iterator &operator-=(ptrdiff_t) noexcept; [all …]
|
D | box.md | 1 {{#title rust::Box<T> — Rust ♡ C++}} 2 # rust::Box\<T\> 7 // rust/cxx.h 11 # namespace rust { 29 const T *operator->() const noexcept; 31 T *operator->() noexcept; 46 # } // namespace rust 55 If T is an opaque Rust type, the Rust type is required to be [Sized] i.e. size 57 sized opaque Rust types. 59 [Sized]: https://doc.rust-lang.org/std/marker/trait.Sized.html [all …]
|
/external/rust/crates/bindgen/ |
D | Cargo.toml.orig | 3 "Jyun-Yan You <jyyou.tw@gmail.com>", 8 description = "Automatically generates Rust FFI bindings to C and C++ libraries." 9 keywords = ["bindings", "ffi", "code-generation"] 10 categories = ["external-ffi-bindings", "development-tools::ffi"] 11 license = "BSD-3-Clause" 14 repository = "https://github.com/rust-lang/rust-bindgen" 16 homepage = "https://rust-lang.github.io/rust-bindgen/" 26 "src/*.rs", 27 "src/**/*.rs", 31 travis-ci = { repository = "rust-lang/rust-bindgen" } [all …]
|
D | Cargo.toml | 9 # issue against the rust-lang/cargo repository. If you're 17 authors = ["Jyun-Yan You <jyyou.tw@gmail.com>", "Emilio Cobos Álvarez <emilio@crisal.io>", "Nick Fi… 19 include = ["LICENSE", "README.md", "Cargo.toml", "build.rs", "src/*.rs", "src/**/*.rs"] 20 description = "Automatically generates Rust FFI bindings to C and C++ libraries." 21 homepage = "https://rust-lang.github.io/rust-bindgen/" 24 keywords = ["bindings", "ffi", "code-generation"] 25 categories = ["external-ffi-bindings", "development-tools::ffi"] 26 license = "BSD-3-Clause" 27 repository = "https://github.com/rust-lang/rust-bindgen" 30 path = "src/lib.rs" [all …]
|
/external/rust/cxx/src/ |
D | lib.rs | 1 …hub]](https://github.com/dtolnay/cxx) [![crates-io]](https://crates.io/crates/cxx) [![do… 3 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo… 4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=55555… 5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&lo… 9 //! This library provides a **safe** mechanism for calling C++ code from Rust 10 //! and Rust code from C++, not subject to the many ways that things can go 11 //! wrong when using bindgen or cbindgen to generate unsafe C-style bindings. 14 //! a project, you would be on the hook for auditing all the unsafe Rust code 17 //! the Rust side can be 100% safe. 36 //! embedded together in one Rust module (the next section shows an example). [all …]
|
/external/oss-fuzz/projects/bignum-fuzzer/ |
D | build.sh | 1 #!/bin/bash -eu 8 # http://www.apache.org/licenses/LICENSE-2.0 18 # Install Rust nightly 19 #curl https://sh.rustup.rs -sSf | sh -s -- -y 23 tar zxf mpdecimal-2.5.0.tar.gz 24 cd mpdecimal-2.5.0 25 ./configure && make -j$(nproc) 27 cd $SRC/openssl 30 CFLAGS+=" -DOPENSSL_NO_ASM=1" 32 ./config --debug no-fips no-shared no-tests [all …]
|
/external/rust/cxx/book/src/build/ |
D | other.md | 1 {{#title Other build systems — Rust ♡ C++}} 6 - Produce the CXX-generated C++ bindings code. 7 - Compile the generated C++ code. 8 - Link the resulting objects together with your other C++ and Rust objects. 12 CXX's Rust code generation automatically happens when the `#[cxx::bridge]` 13 procedural macro is expanded during the normal Rust compilation process, so no 18 - Use the `cxxbridge` command, which is a standalone command line interface to 23 $ cxxbridge src/bridge.rs --header > path/to/bridge.rs.h 24 $ cxxbridge src/bridge.rs > path/to/bridge.rs.cc 27 It's packaged as the `cxxbridge-cmd` crate on crates.io or can be built from [all …]
|
D | cargo.md | 1 {{#title Cargo-based setup — Rust ♡ C++}} 2 # Cargo-based builds 4 As one aspect of delivering a good Rust–C++ interop experience, CXX turns 7 experience `#include`-ing C++ headers across dependencies. 11 CXX's integration with Cargo is handled through the [cxx-build] crate. 13 [cxx-build]: https://docs.rs/cxx-build 25 [build-dependencies] 26 cxx-build = "1.0" 35 ```rust,noplayground 39 cxx_build::bridge("src/main.rs") // returns a cc::Build [all …]
|
/external/rust/crates/protobuf-codegen/ |
D | Cargo.toml.orig | 2 name = "protobuf-codegen" 6 homepage = "https://github.com/stepancheg/rust-protobuf/" 7 repository = "https://github.com/stepancheg/rust-protobuf/" 9 Code generator for rust-protobuf. 11 Includes a library and `protoc-gen-rust` binary. 13 See `protoc-rust` and `protobuf-codegen-pure` crates. 24 name = "protoc-gen-rust" 25 path = "src/bin/protoc-gen-rust.rs" 30 name = "protobuf-bin-gen-rust-do-not-use" 31 path = "src/bin/protobuf-bin-gen-rust-do-not-use.rs" [all …]
|
D | Cargo.toml | 9 # issue against the rust-lang/cargo repository. If you're 14 name = "protobuf-codegen" 17 … "Code generator for rust-protobuf.\n\nIncludes a library and `protoc-gen-rust` binary.\n\nSee `pr… 18 homepage = "https://github.com/stepancheg/rust-protobuf/" 20 repository = "https://github.com/stepancheg/rust-protobuf/" 22 all-features = true 28 name = "protoc-gen-rust" 29 path = "src/bin/protoc-gen-rust.rs" 33 name = "protobuf-bin-gen-rust-do-not-use" 34 path = "src/bin/protobuf-bin-gen-rust-do-not-use.rs"
|
/external/rust/crates/byteorder/src/ |
D | lib.rs | 3 either [big-endian or little-endian order]. 6 byte conversion methods for each type of number in Rust (sans numbers that have 21 Read unsigned 16 bit big-endian integers from a [`Read`] type: 23 ```rust 34 Write unsigned 16 bit little-endian integers to a [`Write`] type: 36 ```rust 54 Note that as of Rust 1.32, the standard numeric types provide built-in methods 58 [big-endian or little-endian order]: https://en.wikipedia.org/wiki/Endianness 66 [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html 67 [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html [all …]
|
/external/rust/crates/anyhow/ |
D | README.md | 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/anyhow-8da0cb?style=for-the-bad… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/anyhow.svg?style=for-the-badge&color=fc8… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-anyhow-66c2a5?style=for-the-badge&lab… 7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/anyhow/CI/maste… 10 for easy idiomatic error handling in Rust applications. 25 - Use `Result<T, anyhow::Error>`, or equivalently `anyhow::Result<T>`, as the 31 ```rust 34 fn get_cluster_info() -> Result<ClusterMap> { 41 - Attach context to help the person troubleshooting the error understand where 42 things went wrong. A low-level error like "No such file or directory" can be [all …]
|
/external/rust/crates/syn/ |
D | README.md | 1 Parser for Rust source code 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/syn-8da0cb?style=for-the-badge&… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/syn.svg?style=for-the-badge&color=fc8d62… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-syn-66c2a5?style=for-the-badge&labelC… 7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/syn/CI/master?s… 9 Syn is a parsing library for parsing a stream of Rust tokens into a syntax tree 10 of Rust source code. 12 Currently this library is geared toward use in Rust procedural macros, but 15 - **Data structures** — Syn provides a complete syntax tree that can represent 16 any valid Rust source code. The syntax tree is rooted at [`syn::File`] which [all …]
|
/external/rust/crates/itoa/ |
D | README.md | 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/itoa-8da0cb?style=for-the-badge… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/itoa.svg?style=for-the-badge&color=fc8d6… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-itoa-66c2a5?style=for-the-badge&label… 7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/itoa/CI/master?… 18 [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html 19 [`fmt::Write`]: https://doc.rust-lang.org/core/fmt/trait.Write.html 20 [libcore]: https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libc… 21 [`fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html 39 ```rust 42 fn demo_itoa_write() -> io::Result<()> { [all …]
|
/external/rust/crates/ryu/ |
D | README.md | 3 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/ryu-8da0cb?style=for-the-badge&… 4 [<img alt="crates.io" src="https://img.shields.io/crates/v/ryu.svg?style=for-the-badge&color=fc8d62… 5 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-ryu-66c2a5?style=for-the-badge&labelC… 6 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/ryu/CI/master?s… 8 Pure Rust implementation of Ryū, an algorithm to quickly convert floating point 11 The PLDI'18 paper [*Ryū: fast float-to-string conversion*][paper] by Ulf Adams 13 under the creative commons CC-BY-SA license. 15 This Rust implementation is a line-by-line port of Ulf Adams' implementation in 19 uses nothing from the Rust standard library so is usable from no_std crates.* 31 ```rust [all …]
|
/external/rust/crates/async-trait/ |
D | README.md | 4 …src="https://img.shields.io/badge/github-dtolnay/async--trait-8da0cb?style=for-the-badge&labelColo… 5 ….io" src="https://img.shields.io/crates/v/async-trait.svg?style=for-the-badge&color=fc8d62&logo=ru… 6 …src="https://img.shields.io/badge/docs.rs-async--trait-66c2a5?style=for-the-badge&labelColor=55555… 7 …" src="https://img.shields.io/github/workflow/status/dtolnay/async-trait/CI/master?style=for-the-b… 9 The initial round of stabilizations for the async/await language feature in Rust 13 ```rust 21 --> src/main.rs:4:5 33 [hard]: https://smallcultfollowing.com/babysteps/blog/2019/10/26/async-fn-in-traits-are-hard/ 45 ```rust 86 It is the intention that all features of Rust traits should work nicely with [all …]
|
/external/rust/crates/plotters/ |
D | README.md | 1 # Plotters - A Rust drawing library focus on data plotting for both WASM and native applications … 4 <img style="display: inline!important" src="https://img.shields.io/crates/v/plotters.svg"></img> 7 <img style="display: inline!important" src="https://docs.rs/plotters/badge.svg"></img> 9 <a href="https://plotters-rs.github.io/rustdoc/plotters/"> 10 …<img style="display: inline! important" src="https://img.shields.io/badge/docs-development-lightgr… 12 <a href="https://travis-ci.org/38/plotters"> 13 …<img style="display: inline! important" src="https://travis-ci.org/38/plotters.svg?branch=master">… 16 …<img style="display: inline! important" src="https://codecov.io/gh/38/plotters/branch/master/graph… 19 …ed for rendering figures, plots, and charts, in pure rust. Plotters supports various types of back… 22 - A new Plotters Developer's Guide is working in progress. The preview version is available at [her… [all …]
|
/external/rust/crates/rustversion/ |
D | README.md | 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/rustversion-8da0cb?style=for-th… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/rustversion.svg?style=for-the-badge&colo… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-rustversion-66c2a5?style=for-the-badg… 7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/rustversion/CI/… 13 [cfg]: https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute 14 [cfg_attr]: https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute 25 - <b>`#[rustversion::stable]`</b> 29 - <b>`#[rustversion::stable(1.34)]`</b> 33 - <b>`#[rustversion::beta]`</b> 37 - <b>`#[rustversion::nightly]`</b> [all …]
|
12345678910>>...12