-
Notifications
You must be signed in to change notification settings - Fork 18
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
Accessing rust lib from NestJS throws error #55
Comments
Nevermind, i got it installed. Let me see whats happening.. |
Ok, I figured it out for you. It's entirely because of the "build": {
"executor": "@monodon/rust:napi",
+ "outputs": ["{workspaceRoot}/libs/rust/testing"],
"options": {
"dist": "libs/rust/testing",
"jsFile": "index.js"
},
"configurations": {
"production": {
"dist": "dist/rust_testing",
"release": true
}
}
If you're just building for one platform you can get away with just having the dist here go to the same location as other dists. You'll end up with a index.js, index.d.ts and a *.node file, and thats all you need to get rust code loading. If you build and run on the same platform. |
Hi, Thanks for the response. indeed now the package build. However building the full app is still failing. see github action: https://github.com/cskiwi/nestjs-rust/actions/runs/9461993977/job/26063979120 And on a second note, running the serve creates a infinite loop because it detects that the
|
You might have to change the |
So when I tried to load in the function from the rust lib it throws:
Any suggestion what might be wrong?
project can be found in: https://github.com/cskiwi/nestjs-rust
You can see the error when you try and build the backend-test library (or the full app)
nx build backend-test
The text was updated successfully, but these errors were encountered: