Skip to content

Commit 9122b05

Browse files
authored
Add Xargo-specific sub project (johnthagen#1)
1 parent f8695b9 commit 9122b05

7 files changed

Lines changed: 34 additions & 2 deletions

File tree

β€Ž.travis.ymlβ€Ž

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,29 @@ language: rust
22

33
matrix:
44
include:
5+
- os: linux
6+
rust: 1.28.0
57
- os: linux
68
rust: stable
79
- os: osx
810
rust: stable
911
- os: windows
1012
rust: stable
13+
- os: linux
14+
rust: nightly-2018-10-31
15+
env: CI_BUILD_TYPE="XARGO"
1116

1217
cache: cargo
1318

1419
script:
15-
- cargo build --verbose --all
20+
- bash -c 'if [[ "$CI_BUILD_TYPE" == "XARGO" ]]; then
21+
cd xargo;
22+
rustup component add rust-src;
23+
cargo install xargo;
24+
xargo build --target x86_64-unknown-linux-gnu --release --verbose;
25+
else
26+
cargo build --release --verbose --all;
27+
fi'
1628

1729
notifications:
1830
email: false

β€ŽCargo.tomlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "min-sized-rust"
33
version = "0.1.0"
44
authors = ["johnthagen <johnthagen@gmail.com>"]
5-
edition = "2015"
65

76
[dependencies]
87

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ panic = 'abort'
117117
> **Note**: Sometime in early November, 2018 `nightly` broke the way Xargo is used in this example,
118118
so the nightly has been pinned.
119119

120+
Example project is located in the [xargo](xargo) folder.
121+
120122
Rust ships pre-built copies of the standard library (`std`) with its toolchains. This means
121123
that developers don't need to build `std` every time they build their applications. `std`
122124
is statically linked into the binary instead.

β€Žxargo/Cargo.lockβ€Ž

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žxargo/Cargo.tomlβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "min-sized-rust-xargo"
3+
version = "0.1.0"
4+
authors = ["johnthagen <johnthagen@gmail.com>"]
5+
edition = "2015"
6+
7+
[dependencies]
8+
9+
[profile.release]
10+
opt-level = 'z' # Optimize for size.
11+
lto = true # Enable Link Time Optimization
12+
panic = 'abort' # Abort on panic
File renamed without changes.

β€Žxargo/src/main.rsβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
Β (0)