Open revmischa opened 4 years ago
Thanks for the report.
Can you paste the cargo.toml file contents you are using here?
I'm seeing the same issues with the same development environment:
$ rustup target add x86_unknown-linux-musl
error: toolchain 'nightly-x86_64-apple-darwin' does not contain component 'rust-std' for target 'x86_unknown-linux-musl'; did you mean 'i586-unknown-linux-musl'?
$ rustup default stable
info: using existing install for 'stable-x86_64-apple-darwin'
info: default toolchain set to 'stable-x86_64-apple-darwin'
stable-x86_64-apple-darwin unchanged - rustc 1.47.0 (18bf6b4f0 2020-10-07)
$ rustup target add x86_unknown-linux-musl
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rust-std' for target 'x86_unknown-linux-musl'; did you mean 'i586-unknown-linux-musl'?
$ rustup component add rust-std --toolchain x86_unknown-linux-musl
error: x86_unknown-linux-musl is a custom toolchain
Should I be using:
$ rustup target add i586-unknown-linux-musl
Or will this not work in Lambda?
This issue prompted me to try the above command due to an issue with the Rust version used by the compiler:
$ node_modules/serverless/bin/serverless.js deploy
Serverless: Building Rust app.cmd.lambda func...
Serverless: Running containerized build
Compiling termcolor v1.1.0
Compiling md5 v0.6.1
Compiling smol_str v0.1.17
error[E0658]: `while` is not allowed in a `const fn`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/smol_str-0.1.17/src/lib.rs:58:9
|
58 | / while i < text.len() {
59 | | buf[i] = text.as_bytes()[i];
60 | | i += 1
61 | | }
| |_________^
|
= note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
error: aborting due to previous error
serverless version:1.83.0 rust-plugin version:0.3.8
🐛 Bug description
🌍 Your environment
serverless version:1.82.0
rust-plugin version:0.3.8