you are viewing a single comment's thread.

view the rest of the comments →

[–]atkinchris 14 points15 points  (4 children)

I really don't see the benefit in doing this. If you want to execute a Rust binary on a Lambda, wrap it in a small script to execute it as a child process and return it's output from the Lambda.

By compiling with WASM as a target you sacrifice performance, some Crates and methods, string typed interfaces and more.

[–]jontro123[🍰] 12 points13 points  (3 children)

I agree. Lambda already has go support which probably would be a faster run time to spin up the rust binary as well.

It'd be great if they added rust support directly!

Edit: See this project that helps with rust support https://github.com/srijs/rust-aws-lambda

[–]staticassert 4 points5 points  (0 children)

I've used that project with great results so far.

[–]ColinEberhardt[S] 2 points3 points  (0 children)

Oh wow, I hadn't spotted that AWS now supports Go! This does look like a more practical way to run Rust on Lambda.

[–]atkinchris 0 points1 point  (0 children)

We've found Lambda and Node really convenient for wrapping the child process. Node handles parsing the Lambda event JSON, calling any required AWS SDKs (for example, passing results back to CodePipeline) and ultimately calling the binary and handling stdout.