Skip to content

Commit 7512abb

Browse files
committed
chore: remove cross-rs references
1 parent 9b6c90d commit 7512abb

File tree

5 files changed

+7
-81
lines changed

5 files changed

+7
-81
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ build-%:
2929
@echo "Building $* with mode: $(BUILD_MODE), bin $(BIN) and arch: $(ARCH)"
3030
ARCH=$(ARCH) BUILD_MODE=$(BUILD_MODE) BIN="newrelic-$(*)" PKG="newrelic_agent_control" ./build/scripts/build_binary.sh
3131

32-
cross-build-%:
33-
@echo "Building $* using cross-rs with mode: $(BUILD_MODE), bin $(BIN) and arch: $(ARCH)"
34-
ARCH=$(ARCH) BUILD_MODE=$(BUILD_MODE) BIN="newrelic-$(*)" PKG="newrelic_agent_control" ./build/scripts/build_binary_cross.sh
35-
3632
.PHONY: tilt-up
3733
tilt-up:
3834
tilt up ; tilt down

Tiltfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ cluster = os.getenv('CLUSTER', "")
1717
chartmuseum_basic_auth = os.getenv('CHARTMUSEUM_BASIC_AUTH', "")
1818

1919
# build_with options:
20-
# cargo: No crosscompilation, faster than cross
21-
# cross: Supports crosscompilaton
20+
# cargo: No crosscompilation, faster than cargo-zigbuild
21+
# zig: Supports crosscompilaton
2222
build_with = os.getenv('BUILD_WITH','zig')
2323
arch = os.getenv('ARCH','arm64')
2424
target_tuple = os.getenv('TARGET_TUPLE', 'aarch64-unknown-linux-musl')
@@ -39,15 +39,6 @@ if build_with == 'cargo':
3939
'./agent-control',
4040
]
4141
)
42-
elif build_with == 'cross':
43-
local_resource(
44-
'build-binary',
45-
cmd="make BUILD_MODE=debug ARCH=%s cross-build-agent-control-cli" % arch +
46-
"&& make BUILD_MODE=debug ARCH=%s cross-build-agent-control-k8s" % arch ,
47-
deps=[
48-
'./agent-control',
49-
]
50-
)
5142
elif build_with == 'zig':
5243
local_resource(
5344
'build-binary',

agent-control/tests/k8s/Tiltfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ helm_resource(
3434
)
3535

3636
# build_with options:
37-
# cargo: No crosscompilation, faster than cross
38-
# cross: Supports crosscompilaton
37+
# cargo: No crosscompilation, faster than cargo-zigbuild
38+
# zig: Supports crosscompilaton
3939
build_with = os.getenv('BUILD_WITH','zig')
4040
arch = os.getenv('ARCH','arm64')
4141
target_tuple = os.getenv('TARGET_TUPLE', 'aarch64-unknown-linux-musl')
@@ -49,13 +49,6 @@ if build_with == 'cargo':
4949
cmd="cargo build --package newrelic_agent_control --bin newrelic-agent-control-k8s && mkdir -p bin && rm -f bin/newrelic-agent-control-"+arch+" && mv target/debug/newrelic-agent-control-k8s bin/newrelic-agent-control-"+arch,
5050
deps=["../../../agent-control/src"]
5151
)
52-
elif build_with == 'cross':
53-
local_resource(
54-
'build-binary',
55-
dir="../../../",
56-
cmd="make BUILD_MODE=debug ARCH=%s cross-build-agent-control-k8s" % arch,
57-
deps=["../../../agent-control/src"]
58-
)
5952
elif build_with == 'zig':
6053
local_resource(
6154
'build-binary',

build/scripts/build_binary_cross.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/DEVELOPMENT.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Compiling and running Agent Control
44

5-
As of now, Agent Control is supported on Linux (x86_64 and aarch64). The program is written in Rust, and for multiplatform compilation we leverage [`cross`](https://github.com/cross-rs/cross).
5+
As of now, Agent Control is supported on Linux (x86_64 and aarch64). The program is written in Rust, and for multiplatform compilation we leverage [`cargo-zigbuild`](https://github.com/rust-cross/cargo-zigbuild) and musl libc.
66

77
### On-host
88

99
To compile and run locally:
1010

1111
1. Install the [Rust toolchain](https://www.rust-lang.org/tools/install) for your system.
12-
2. Run `cargo build --bin newrelic-agent-control-onhost`
13-
3. `newrelic-agent-control-onhost` binary will be generated at `./target/debug/newrelic-agent-control-onhost`
12+
2. Run `cargo zigbuild --bin newrelic-agent-control --target <ARCH>-unknown-linux-musl`, where `<ARCH>` is either `x86_64` or `aarch64`, depending on your system.
13+
3. `newrelic-agent-control` binary will be generated at `./target/debug/newrelic-agent-control`
1414
4. Prepare a `config.yaml` file in `/etc/newrelic-agent-control/`, example:
1515

1616
```yaml
@@ -95,14 +95,6 @@ We use [`minikube`](https://minikube.sigs.k8s.io/docs/) and [`tilt`](https://til
9595
- Ensure you have `tilt` installed for managing local development environments.
9696
- Add an Agent Control values file in `local/agent-control-tilt.yml`.
9797

98-
> [!CAUTION]
99-
> Be aware that `cross` 0.2.5 [broke cross-compilation](https://github.com/cross-rs/cross/issues/1214). If you are using
100-
> it, run the following command.
101-
>
102-
> ```sh
103-
> docker pull ghcr.io/cross-rs/aarch64-unknown-linux-musl:0.2.5 --platform linux/x86_64
104-
> ```
105-
10698
Note: Adding the `'chart_repo'` setting, pointing to the [New Relic charts](https://github.com/newrelic/helm-charts/tree/master/charts) on a local path, allows using local helm charts.
10799

108100
#### Steps

0 commit comments

Comments
 (0)