Compile on Mac OS for Chrome OS Flex

Hello,
I use a Mac for coding (M2) and I need to compile my application for a computer running "Chrome OS Flex".
Impossible to compile directly on the Chrome which lacks memory (signal: 9, SIGKILL: kill).

That's why I'm trying to compile from my main computer (Mac). I tried to compile with "cargo build --target=x86_64-unknown-linux-gnu --release" but the application is not compatible. (ui not working via penguin)

Which "target" should I use?

Thanks in advance.

I don't have any cross-compilation advice for you, but you might be able to successfully compile on the Chrome OS machine if you configure the build jobs and codegen units to both be 1, which reduces parallelism, and thus reduces peak memory consumption. It will still likely be quite slow.

You would create a config.toml file which contains:

build.jobs = 1
profile.dev.codegen-units = 1
profile.test.codegen-units = 1
profile.release.codegen-units = 1
profile.bench.codegen-units = 1

Thanks for your answer :slight_smile:
Unfortunately this also results in "signal: 9, SIGKILL: kill".
I tried with the directives in the "~/.cargo/config.toml" file and also directly in the cargo.toml file under "[build] and [profile]" and ... same thing :frowning:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.