Repository navigation
Replies: 2 comments 4 replies
|
Hey Tony, it’s good to hear from you. I think there might be some benefits for Netlify customers if their builders use Cargo Lambda, but probably not worth their time if the feature has been in experimental for years. The only information I could find about that feature is this blog post, I don’t know if they have any docs at all. Overall, they could benefit from a more cohesive experience, since their customers could build locally in the same way they build on Netlify Build. Cargo Lambda also comes with more up to date templates, which I’m guessing they’ve not updated much since they wrote that post. Another benefit that comes to my mind is that Cargo Lambda optimizes binaries by default. I don’t see any information about them stripping binaries, which makes me think that their builders don’t add any additional optimizations to release builds. Unless it has changed, Netlify doesn’t let you select the function’s architecture, so the cross-compiling features that Cargo Lambda offers might not be as necessary for their builders, since they build on Linux x86-64 and deploy on the same architecture, but it’d benefit people like you that want to compile binaries locally, and want to run tests before deploying. |
So great to hear the confirmation on this item. I noticed it was making my binaries smaller. 😀 I agree, Netlify is definitely not using any optimizations to release builds. Netlify is only using The advantage I see to having Cargo Lambda for cross compiling is not dealing with the issues of variations of libc and cross-linkers of cargo compiler vs Zig. This is where I think the biggest win would be, since someone could bring in packages like Thanks for working on this, it's really made things better for me! I have enjoyed using Rust more and really like using it for the lambda functions. |

Uh oh!
There was an error while loading. Please reload this page.
Hi David,
Happy New Year!
I've been using Rust for Netlify functions and was at one time using the build compile. Then later using
cargo-zigbuildand now I'm usingcargo-lambdafor the builds and zip to deploy my functions. Working fantastic!I was just wondering your thoughts about Netlify not using
cargo buildtargetingmusland moving tocargo-lambda? I wanted to pass it by you before I mentioned it over there. Wanted to hear what you think if that would be a good idea.I personally have been building some postgres stuff using
dieselon front and back and do all my compiles locally rather than build functions on Netlify. I doubt that I would change that process due to the build times, but it would probably be better forcargo-lambdato be their method of compile. I know it's still in experimental/beta status.Regards,
Tony
All reactions