Skip to content

Commit b88052d

Browse files
committed
Rearrange precompiled directory
1 parent a282927 commit b88052d

File tree

13 files changed

+51
-43
lines changed

13 files changed

+51
-43
lines changed

precompiled/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/x86_64-unknown-linux-gnu/serde_derive
1+
/serde_derive/serde_derive-x86_64-unknown-linux-gnu

precompiled/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["proc-macro2", "serde_derive"]
2+
members = ["bin", "proc-macro2"]
33
resolver = "2"
44

55
[patch.crates-io]

precompiled/bin/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "serde_derive"
3+
version = "1.0.171"
4+
authors = ["David Tolnay <[email protected]>"]
5+
publish = false
6+
7+
[lib]
8+
doctest = false
9+
10+
[[bin]]
11+
name = "serde_derive"
12+
path = "main.rs"
13+
14+
[dependencies]
15+
proc-macro2 = "1"
16+
quote = { version = "1", default-features = false }
17+
syn = { version = "2.0.25", default-features = false, features = ["clone-impls", "derive", "parsing", "printing"] }
File renamed without changes.
File renamed without changes.
File renamed without changes.

precompiled/build.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
#!/bin/bash
22

33
cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null
4+
set -e -x
45

56
# TODO: Sanitize host filesystem paths. https://github.com/rust-lang/cargo/issues/12137
67

78
cargo +nightly build \
8-
--manifest-path serde_derive/Cargo.toml \
9+
--manifest-path bin/Cargo.toml \
910
--bin serde_derive \
1011
--profile precompiled \
1112
-Z unstable-options \
1213
-Z build-std=std,panic_abort \
1314
-Z build-std-features=panic_immediate_abort \
1415
--target x86_64-unknown-linux-musl \
15-
--out-dir x86_64-unknown-linux-gnu
16+
--out-dir serde_derive
1617

17-
#upx --best --lzma x86_64-unknown-linux-gnu/serde_derive
18+
rm -f serde_derive/serde_derive-x86_64-unknown-linux-gnu
19+
mv serde_derive/serde_derive{,-x86_64-unknown-linux-gnu}
20+
21+
#upx --best --lzma serde_derive/serde_derive-x86_64-unknown-linux-gnu

precompiled/serde_derive/Cargo.toml

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
[package]
2-
name = "serde_derive"
3-
version = "1.0.171"
2+
name = "serde_derive-x86_64-unknown-linux-gnu"
3+
version = "1.0.171-alpha.3"
44
authors = ["David Tolnay <[email protected]>"]
5-
publish = false
5+
categories = ["no-std", "no-std::no-alloc"]
6+
description = "Precompiled implementation of #[derive(Serialize, Deserialize)]"
7+
documentation = "https://serde.rs/derive.html"
8+
edition = "2015"
9+
homepage = "https://serde.rs"
10+
include = ["serde_derive", "src"]
11+
keywords = ["serde", "serialization", "no_std", "derive"]
12+
license = "MIT OR Apache-2.0"
13+
repository = "https://github.com/serde-rs/serde"
614

715
[lib]
8-
doctest = false
9-
10-
[[bin]]
1116
name = "serde_derive"
12-
path = "main.rs"
17+
proc-macro = true
18+
19+
[features]
20+
default = []
21+
deserialize_in_place = []
22+
23+
[package.metadata.docs.rs]
24+
targets = ["x86_64-unknown-linux-gnu"]
1325

14-
[dependencies]
15-
proc-macro2 = "1"
16-
quote = { version = "1", default-features = false }
17-
syn = { version = "2.0.25", default-features = false, features = ["clone-impls", "derive", "parsing", "printing"] }
26+
[workspace]

precompiled/x86_64-unknown-linux-gnu/src/lib.rs renamed to precompiled/serde_derive/src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ fn derive(select: u8, input: TokenStream) -> TokenStream {
3636
memory.linearize_token(token, &mut buf);
3737
}
3838

39-
let mut child = Command::new(concat!(env!("CARGO_MANIFEST_DIR"), "/serde_derive"))
39+
let path = concat!(
40+
env!("CARGO_MANIFEST_DIR"),
41+
"/serde_derive-x86_64-unknown-linux-gnu",
42+
);
43+
let mut child = Command::new(path)
4044
.stdin(Stdio::piped())
4145
.stdout(Stdio::piped())
4246
.spawn()

precompiled/x86_64-unknown-linux-gnu/Cargo.toml

-26
This file was deleted.

0 commit comments

Comments
 (0)