diff options
author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2021-08-10 13:52:19 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-26 22:09:43 +0100 |
commit | 61e1570c6a09c1984e919e8c0a82a74c1a08d821 (patch) | |
tree | accab4b08aa3c62f098c9bb19399efb46906256a /meta/recipes-example | |
parent | 705b1d757fa221614f4f72cabf0fac5884cb6bfd (diff) | |
download | poky-61e1570c6a09c1984e919e8c0a82a74c1a08d821.tar.gz |
rust: initial merge of most of meta-rust
In the meta-rust repo at commit:
448047c Upgrade to 1.54.0 (#359)
Make the required directories:
mkdir ../oe-core/meta/recipes-devtools/rust
mkdir ../oe-core/meta/recipes-devtools/cargo
mkdir ../oe-core/meta/recipes-example
and then:
cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust
cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo
cp lib/crate.py ../oe-core/meta/lib
cp recipes-example/* ../oe-core/meta/recipes-example
cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/
cp classes/* ../oe-core/meta/classes/
cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups
(From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-example')
3 files changed, 211 insertions, 0 deletions
diff --git a/meta/recipes-example/rust-hello-world/rust-hello-world/0001-enable-LTO.patch b/meta/recipes-example/rust-hello-world/rust-hello-world/0001-enable-LTO.patch new file mode 100644 index 0000000000..56ef9e73e6 --- /dev/null +++ b/meta/recipes-example/rust-hello-world/rust-hello-world/0001-enable-LTO.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From fa40b874f6470ec11a8fd7b0c9909d0cdd2d6feb Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Callaghan <dan.callaghan@opengear.com> | ||
3 | Date: Fri, 5 Feb 2021 08:56:34 +1000 | ||
4 | Subject: [PATCH] enable LTO | ||
5 | |||
6 | --- | ||
7 | Cargo.toml | 3 +++ | ||
8 | 1 file changed, 3 insertions(+) | ||
9 | |||
10 | diff --git a/Cargo.toml b/Cargo.toml | ||
11 | index 7a2f6c8..cdb6b5d 100644 | ||
12 | --- a/Cargo.toml | ||
13 | +++ b/Cargo.toml | ||
14 | @@ -3,3 +3,6 @@ | ||
15 | name = "rust-hello-world" | ||
16 | version = "0.0.1" | ||
17 | authors = ["Cody P Schafer <dev@codyps.com>"] | ||
18 | + | ||
19 | +[profile.release] | ||
20 | +lto = true | ||
21 | -- | ||
22 | 2.28.0 | ||
23 | |||
diff --git a/meta/recipes-example/rust-hello-world/rust-hello-world_git.bb b/meta/recipes-example/rust-hello-world/rust-hello-world_git.bb new file mode 100644 index 0000000000..c29eac34e5 --- /dev/null +++ b/meta/recipes-example/rust-hello-world/rust-hello-world_git.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | inherit cargo | ||
2 | |||
3 | SRC_URI = "git://github.com/meta-rust/rust-hello-world.git;protocol=https" | ||
4 | SRCREV="e0fa23f1a3cb1eb1407165bd2fc36d2f6e6ad728" | ||
5 | LIC_FILES_CHKSUM="file://COPYRIGHT;md5=e6b2207ac3740d2d01141c49208c2147" | ||
6 | |||
7 | SRC_URI += "\ | ||
8 | file://0001-enable-LTO.patch \ | ||
9 | " | ||
10 | |||
11 | SUMMARY = "Hello World by Cargo for Rust" | ||
12 | HOMEPAGE = "https://github.com/meta-rust/rust-hello-world" | ||
13 | LICENSE = "MIT | Apache-2.0" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-example/rustfmt/rustfmt_1.4.2.bb b/meta/recipes-example/rustfmt/rustfmt_1.4.2.bb new file mode 100644 index 0000000000..ecced49049 --- /dev/null +++ b/meta/recipes-example/rustfmt/rustfmt_1.4.2.bb | |||
@@ -0,0 +1,171 @@ | |||
1 | # Auto-Generated by cargo-bitbake 0.3.13 | ||
2 | # | ||
3 | inherit cargo | ||
4 | |||
5 | # If this is git based prefer versioned ones if they exist | ||
6 | # DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | # how to get rustfmt-nightly could be as easy as but default to a git checkout: | ||
9 | # SRC_URI += "crate://crates.io/rustfmt-nightly/1.4.2" | ||
10 | SRC_URI += "git://github.com/rust-lang/rustfmt/;protocol=https;nobranch=1" | ||
11 | SRCREV = "aeb3496f31a0dfa90fc511520d2023634e885260" | ||
12 | S = "${WORKDIR}/git" | ||
13 | CARGO_SRC_DIR = "" | ||
14 | |||
15 | |||
16 | # please note if you have entries that do not begin with crate:// | ||
17 | # you must change them to how that package can be fetched | ||
18 | SRC_URI += " \ | ||
19 | crate://crates.io/aho-corasick/0.7.4 \ | ||
20 | crate://crates.io/annotate-snippets/0.6.1 \ | ||
21 | crate://crates.io/ansi_term/0.11.0 \ | ||
22 | crate://crates.io/argon2rs/0.2.5 \ | ||
23 | crate://crates.io/arrayvec/0.4.11 \ | ||
24 | crate://crates.io/atty/0.2.13 \ | ||
25 | crate://crates.io/autocfg/0.1.5 \ | ||
26 | crate://crates.io/backtrace-sys/0.1.31 \ | ||
27 | crate://crates.io/backtrace/0.3.33 \ | ||
28 | crate://crates.io/bitflags/1.1.0 \ | ||
29 | crate://crates.io/blake2-rfc/0.2.18 \ | ||
30 | crate://crates.io/bstr/0.2.6 \ | ||
31 | crate://crates.io/bytecount/0.5.1 \ | ||
32 | crate://crates.io/byteorder/1.3.2 \ | ||
33 | crate://crates.io/c2-chacha/0.2.2 \ | ||
34 | crate://crates.io/cargo_metadata/0.8.1 \ | ||
35 | crate://crates.io/cc/1.0.38 \ | ||
36 | crate://crates.io/cfg-if/0.1.9 \ | ||
37 | crate://crates.io/clap/2.33.0 \ | ||
38 | crate://crates.io/cloudabi/0.0.3 \ | ||
39 | crate://crates.io/constant_time_eq/0.1.3 \ | ||
40 | crate://crates.io/crossbeam-channel/0.3.9 \ | ||
41 | crate://crates.io/crossbeam-deque/0.2.0 \ | ||
42 | crate://crates.io/crossbeam-epoch/0.3.1 \ | ||
43 | crate://crates.io/crossbeam-utils/0.2.2 \ | ||
44 | crate://crates.io/crossbeam-utils/0.6.6 \ | ||
45 | crate://crates.io/derive-new/0.5.7 \ | ||
46 | crate://crates.io/diff/0.1.11 \ | ||
47 | crate://crates.io/dirs-sys/0.3.3 \ | ||
48 | crate://crates.io/dirs/2.0.1 \ | ||
49 | crate://crates.io/either/1.5.2 \ | ||
50 | crate://crates.io/ena/0.13.0 \ | ||
51 | crate://crates.io/env_logger/0.6.2 \ | ||
52 | crate://crates.io/failure/0.1.5 \ | ||
53 | crate://crates.io/failure_derive/0.1.5 \ | ||
54 | crate://crates.io/fnv/1.0.6 \ | ||
55 | crate://crates.io/fuchsia-cprng/0.1.1 \ | ||
56 | crate://crates.io/getopts/0.2.19 \ | ||
57 | crate://crates.io/getrandom/0.1.6 \ | ||
58 | crate://crates.io/globset/0.4.4 \ | ||
59 | crate://crates.io/heck/0.3.1 \ | ||
60 | crate://crates.io/humantime/1.2.0 \ | ||
61 | crate://crates.io/ignore/0.4.8 \ | ||
62 | crate://crates.io/indexmap/1.0.2 \ | ||
63 | crate://crates.io/itertools/0.8.0 \ | ||
64 | crate://crates.io/itoa/0.4.4 \ | ||
65 | crate://crates.io/jobserver/0.1.16 \ | ||
66 | crate://crates.io/lazy_static/1.3.0 \ | ||
67 | crate://crates.io/libc/0.2.60 \ | ||
68 | crate://crates.io/lock_api/0.1.5 \ | ||
69 | crate://crates.io/log/0.4.7 \ | ||
70 | crate://crates.io/memchr/2.2.1 \ | ||
71 | crate://crates.io/memoffset/0.2.1 \ | ||
72 | crate://crates.io/nodrop/0.1.13 \ | ||
73 | crate://crates.io/num_cpus/1.10.1 \ | ||
74 | crate://crates.io/owning_ref/0.4.0 \ | ||
75 | crate://crates.io/packed_simd/0.3.3 \ | ||
76 | crate://crates.io/parking_lot/0.7.1 \ | ||
77 | crate://crates.io/parking_lot_core/0.4.0 \ | ||
78 | crate://crates.io/ppv-lite86/0.2.5 \ | ||
79 | crate://crates.io/proc-macro2/0.4.30 \ | ||
80 | crate://crates.io/quick-error/1.2.2 \ | ||
81 | crate://crates.io/quote/0.6.13 \ | ||
82 | crate://crates.io/rand/0.6.5 \ | ||
83 | crate://crates.io/rand/0.7.0 \ | ||
84 | crate://crates.io/rand_chacha/0.1.1 \ | ||
85 | crate://crates.io/rand_chacha/0.2.1 \ | ||
86 | crate://crates.io/rand_core/0.3.1 \ | ||
87 | crate://crates.io/rand_core/0.4.0 \ | ||
88 | crate://crates.io/rand_core/0.5.0 \ | ||
89 | crate://crates.io/rand_hc/0.1.0 \ | ||
90 | crate://crates.io/rand_hc/0.2.0 \ | ||
91 | crate://crates.io/rand_isaac/0.1.1 \ | ||
92 | crate://crates.io/rand_jitter/0.1.4 \ | ||
93 | crate://crates.io/rand_os/0.1.3 \ | ||
94 | crate://crates.io/rand_pcg/0.1.2 \ | ||
95 | crate://crates.io/rand_xorshift/0.1.1 \ | ||
96 | crate://crates.io/rdrand/0.4.0 \ | ||
97 | crate://crates.io/redox_syscall/0.1.56 \ | ||
98 | crate://crates.io/redox_users/0.3.0 \ | ||
99 | crate://crates.io/regex-syntax/0.6.10 \ | ||
100 | crate://crates.io/regex/1.2.0 \ | ||
101 | crate://crates.io/rustc-ap-arena/542.0.0 \ | ||
102 | crate://crates.io/rustc-ap-graphviz/542.0.0 \ | ||
103 | crate://crates.io/rustc-ap-rustc_data_structures/542.0.0 \ | ||
104 | crate://crates.io/rustc-ap-rustc_errors/542.0.0 \ | ||
105 | crate://crates.io/rustc-ap-rustc_lexer/542.0.0 \ | ||
106 | crate://crates.io/rustc-ap-rustc_macros/542.0.0 \ | ||
107 | crate://crates.io/rustc-ap-rustc_target/542.0.0 \ | ||
108 | crate://crates.io/rustc-ap-serialize/542.0.0 \ | ||
109 | crate://crates.io/rustc-ap-syntax/542.0.0 \ | ||
110 | crate://crates.io/rustc-ap-syntax_pos/542.0.0 \ | ||
111 | crate://crates.io/rustc-demangle/0.1.15 \ | ||
112 | crate://crates.io/rustc-hash/1.0.1 \ | ||
113 | crate://crates.io/rustc-rayon-core/0.2.0 \ | ||
114 | crate://crates.io/rustc-rayon/0.2.0 \ | ||
115 | crate://crates.io/rustc-workspace-hack/1.0.0 \ | ||
116 | crate://crates.io/rustc_version/0.2.3 \ | ||
117 | crate://crates.io/ryu/1.0.0 \ | ||
118 | crate://crates.io/same-file/1.0.5 \ | ||
119 | crate://crates.io/scoped-tls/1.0.0 \ | ||
120 | crate://crates.io/scoped_threadpool/0.1.9 \ | ||
121 | crate://crates.io/scopeguard/0.3.3 \ | ||
122 | crate://crates.io/semver-parser/0.7.0 \ | ||
123 | crate://crates.io/semver/0.9.0 \ | ||
124 | crate://crates.io/serde/1.0.97 \ | ||
125 | crate://crates.io/serde_derive/1.0.97 \ | ||
126 | crate://crates.io/serde_json/1.0.40 \ | ||
127 | crate://crates.io/smallvec/0.6.10 \ | ||
128 | crate://crates.io/spin/0.5.0 \ | ||
129 | crate://crates.io/stable_deref_trait/1.1.1 \ | ||
130 | crate://crates.io/strsim/0.8.0 \ | ||
131 | crate://crates.io/structopt-derive/0.2.18 \ | ||
132 | crate://crates.io/structopt/0.2.18 \ | ||
133 | crate://crates.io/syn/0.15.42 \ | ||
134 | crate://crates.io/synstructure/0.10.2 \ | ||
135 | crate://crates.io/term/0.6.0 \ | ||
136 | crate://crates.io/termcolor/1.0.5 \ | ||
137 | crate://crates.io/textwrap/0.11.0 \ | ||
138 | crate://crates.io/thread_local/0.3.6 \ | ||
139 | crate://crates.io/toml/0.5.1 \ | ||
140 | crate://crates.io/ucd-util/0.1.5 \ | ||
141 | crate://crates.io/unicode-segmentation/1.3.0 \ | ||
142 | crate://crates.io/unicode-width/0.1.5 \ | ||
143 | crate://crates.io/unicode-xid/0.1.0 \ | ||
144 | crate://crates.io/unicode_categories/0.1.1 \ | ||
145 | crate://crates.io/utf8-ranges/1.0.3 \ | ||
146 | crate://crates.io/vec_map/0.8.1 \ | ||
147 | crate://crates.io/walkdir/2.2.9 \ | ||
148 | crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ | ||
149 | crate://crates.io/winapi-util/0.1.2 \ | ||
150 | crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ | ||
151 | crate://crates.io/winapi/0.3.7 \ | ||
152 | crate://crates.io/wincolor/1.0.1 \ | ||
153 | " | ||
154 | |||
155 | |||
156 | |||
157 | # FIXME: update generateme with the real MD5 of the license file | ||
158 | LIC_FILES_CHKSUM = " \ | ||
159 | file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \ | ||
160 | file://LICENSE-MIT;md5=0b29d505d9225d1f0815cbdcf602b901 \ | ||
161 | " | ||
162 | |||
163 | SUMMARY = "Tool to find and fix Rust formatting issues" | ||
164 | HOMEPAGE = "https://github.com/rust-lang/rustfmt" | ||
165 | LICENSE = "Apache-2.0 | MIT" | ||
166 | |||
167 | # includes this file if it exists but does not fail | ||
168 | # this is useful for anything you may want to override from | ||
169 | # what cargo-bitbake generates. | ||
170 | include rustfmt-nightly-${PV}.inc | ||
171 | include rustfmt-nightly.inc | ||