Fixes to get the plugin working again#5
Open
kristallizer wants to merge 3 commits into
Open
Conversation
Signed-off-by: Krishna Aradhi <karadhi@justworks.com>
Signed-off-by: Krishna Aradhi <karadhi@justworks.com>
Owner
|
Hi @kristallizer! The first error is probably because you're putting the About the linker issue, I'll do some tests here. But thanks in advance for this PR, I really appreciate it ❤️ |
Author
|
Hey @fdaciuk, my serverless.yml is in the root dir alongside the README file. I defined the function in serverless.yml like so: functions:
hello:
# handler value syntax is `{cargo-package-name}.{bin-name}`
# or `{cargo-package-name}` for short when you are building a
# default bin for a given package.
handler: my-project1.test-func
events:
- http:
path: "/"
method: GET
tags:
rust: trueCargo.toml in the root dir: [workspace]
members = ["my-project1"]My project file structure is like so: Cargo.toml in project dir: [package]
name = "my-project1"
version = "0.1.0"
edition = "2018"
[dependencies]
tokio = { version = "^1.29.1", features = ["macros"] }
lambda_http = "^0.8.1"
serde_json = "^1.0"
clippy = "^0.0.302"
serde = "^1.0.174"
tracing-subscriber = "^0.3.17"
tracing = "^0.1.37"
[[bin]]
name = "test-func"
path = "src/main.rs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, I ran into deployment issues when I was trying to deploy a Rust function from my Macbook. I'd love to get your feedback on whether these changes make sense or I was using it wrong to being with.
Also, I don't have a Linux machine to test these changes on, so some testing on your side would be much appreciated.
First issue
I dug into the source code a bit and the main issue I found was that Cargo defaults to building the binary in the root
target/, but this plugin tries to build in<project-dir>/target. I propose that we fix this by building everything in the roottarget/directory.Second issue
I also ran into an issue with the linker:
I was able to fix this by switching to cargo-zigbuild as a linker.