-
Notifications
You must be signed in to change notification settings - Fork 285
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
Feature Req: Set the target directory #292
Comments
Please refer to https://dev.to/kayis/rust-on-aws-lambda-with-neon--cloud9--4el7 |
That is helpful, but not convenient at all for local development. |
Would something like this work? FROM lambci/lambda:build-nodejs6.10
RUN curl https://sh.rustup.rs -sSf | sh /dev/stdin -y
ENV PATH="$PATH:/root/.cargo/bin" docker build -t lambda-neon-dev .
docker run --rm \
-w /src \
-v $(pwd):/src \
-v $(pwd)/node_modules/.cargo/registry:/root/.cargo/registry \
lambda-neon-dev npm install I don't use lambda, but I do all of my development in docker and this pattern works well. You can substitute any preferered location for the shared cargo cache. It can even be removed, but keeping it improves build times. |
@Luke-Nukem Totally legit request! Right now we're just inferring the target info from the current machine, which means we don't support cross-compilation. I've filed an RFC issue here: In the meantime can any of the suggestions above get you unstuck? If not we can try to prioritize getting the CLI options fleshed out and implemented. |
Workaround is using |
This was fixed in |
I was evaluating how I could use Neon to leverage Rust for use on AWS Lambdas and bumped up against a small issue.
The Lambdas require building against amazon Linux if you want to use native code due to the Amazon glibc being a different version to most Linux distros - as such I do all my compilation for them through a Docker image. This results in the final compiled libraries being located in
target/x86_64-unknown-linux-gnu/<release/debug>
though, and so theneon build
(or npm install) fails since it can't find the library intarget/release
.Is there a way to set the directory that
neon build
gets the compiled library from?The text was updated successfully, but these errors were encountered: