DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
435 stars 59 forks source link

Bindings for aarch64 gnu are out of date #186

Open Sytten opened 11 months ago

Sytten commented 11 months ago

Bunch of missing symbols, it looks like CI is not building the platform.

Sytten commented 11 months ago

For those that might need a quick solution, I am maintaining a fork with updated bindings https://github.com/caido/dependency-rquickjs/tree/caido I will try to find the time to simplify the bindings generation and upstream it. Cross does wonders for that.

DelSkayn commented 11 months ago

I have deleted the bindings for now and advise to probably use the bindgen feature aarch64-gnu as I currently have, indeed, no CI setup to build bindings for that platform.

I am currently unsure if I really want to maintain a large collections of bindings or instead just tell those who need to build for a less common platform to just use bindgen.

Sytten commented 11 months ago

Cross compiling with bindgen is kinda annoying and slow so IDK. Unsure how libsqlite-sys manages it with one binding file but it works for us across all targets, maybe we could take a look at that? Otherwise with cross v0.3.0 (should be out in August) we can very easily maintain a lot of bindings. I am waiting on that release to PR a change to the CI workflow.

DelSkayn commented 11 months ago

I looked into cross but I found it didn't have support for running windows targets specifically msvc, it only supports windows-gnu. What would your solution be for creating bindings for that target?

As far as I am am aware windows with the msvc compiler is still the recommend compiler to use with rust on windows so we should provide bindings for that target.

Sytten commented 11 months ago

Yeah for some platforms the consumer of cross needs to build images themselves since they cant legally offer them for download, see https://github.com/cross-rs/cross-toolchains. Its the same problem with macos.

Personally I compile rquickjs with windows gnu so I think the bindings dont change? I am quite new to bindings generation so some things are still unclear to me (like why some libraries can get away with one binding file for all toolchains and some cant).