Skip to content
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

index.node is not a valid Wiin32 application #40

Open
nizans opened this issue May 2, 2023 · 5 comments
Open

index.node is not a valid Wiin32 application #40

nizans opened this issue May 2, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@nizans
Copy link

nizans commented May 2, 2023

Hey!
Awesome tool, thanks for this it is really useful!

I cant get it to work on my project. Getting error when trying to run:

image

Any thought on a way to fix this?

@activeguild activeguild added the bug Something isn't working label May 2, 2023
@nizans
Copy link
Author

nizans commented May 2, 2023

Solved by installing node-gyp

@nizans nizans closed this as completed May 2, 2023
@nizans
Copy link
Author

nizans commented May 2, 2023

Update: I think it is still relevant node-gyp isn't enough, but looks like cloning the repo and running build works, so I just copied the built package to my node modules and it works.

@nizans nizans reopened this May 2, 2023
@activeguild
Copy link
Owner

@nizans

Would a post-build run after executing the following comments help?

rustup target add wasm32-wasi

@Hecatron
Copy link

Hecatron commented Aug 13, 2023

It looks as if the prebuilt index.node file included when you install the package via npm is only intended for use with Linux x86-64
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked
This means if you were to use it on a platform such as windows or an Rpi (which is what I've done so far) it would fail.
In otherwords the current setup isn't cross platform without using rust to rebuild it

@Hecatron
Copy link

My understanding of node-gyp is that it's typically a build tool for C/C++ binaries for use with node that uses python, so I'm not sure how that would fit in with rust
After digging a bit deeper it looks as if the eventual intent is to build out from rust to a wasm32-wasi file which can then be run across different platforms
VSCode typically uses https://github.com/microsoft/vscode-ripgrep to connect node to ripgrep, but I suspect the wasm approach is probably simpler since then all you'd need is a dependency on something like wasmer-js which is a pretty cool way to do it.

So far I've been trying to build on a Rpi for the node target with rust installed but it seems to be breaking when building ast_node

git clone https://github.com/activeguild/css-to-vanilla-extract.git
cd css-to-vanilla-extract
npm ci
npm run build:node

I might have a try at upping the dependency versions to see if that fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants