Skip to content

Detection of release-profile Rust functions fails due to faulty binary-info check #6168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChristopherBiscardi opened this issue Nov 15, 2023 · 2 comments
Labels
type: bug code to address defects in shipped code

Comments

@ChristopherBiscardi
Copy link

Describe the bug

The netlify cli overfits detection of Rust binaries by looking for a specific symbol named rust_eh_personality, as filed on the binary-info package.

It would be nice if Netlify's CLI didn't overfit here trying to identify Rust binaries, or allowed some kind of opt-out of automatic detection of serverless functions so that --release profile Rust binaries can be deployed to Netlify.

Steps to reproduce

  1. git clone [email protected]:ChristopherBiscardi/netlify-binary-function-reproduction.git
  2. cargo install cargo-lambda (handles cross-compilation and such)
  3. cargo lambda build
  4. cp target/lambda/test_function/bootstrap netlify/functions/test
  5. netlify deploy

output will show one function

Deploying to draft URL...
✔ No cached functions were found
✔ Finished hashing 1 files and 1 functions
✔ CDN requesting 1 files and 1 functions
  1. cargo lambda build --release
  2. cp target/lambda/test_function/bootstrap netlify/functions/test
  3. netlify deploy

Netlify will not recognize a Rust binary built with --release.

Deploying to draft URL...
✔ No cached functions were found
✔ Finished hashing
✔ CDN requesting 0 files
✔ Finished uploading 0 assets

Configuration

No response

Environment

n/a

@serhalp
Copy link
Collaborator

serhalp commented Apr 23, 2025

As this issue is very stale, I'm going to close it out. Please feel free to reply or open a new issue if you're still experiencing this.

If you need additional support, please check out our support page: https://www.netlify.com/support/. Thank you!

@serhalp serhalp closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2025
@ChristopherBiscardi
Copy link
Author

I'm not sure what makes this issue stale other than that it hasn't been fixed? It seems to me that binary-info has not had any changes and that netlify-cli still uses it for detection.

For anyone else landing here, it does not seem like this functionality is being supported according to: https://answers.netlify.com/t/roadmap-for-full-rust-support-since-its-been-in-experimental-mode-for-quite-some-time/111836/2

So https://www.cargo-lambda.info/ would be a good replacement since the underlying platform (AWS Lambda) does support Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants