denoland / deno_bindgen

Write high-level Deno FFI libraries in Rust.
MIT License
287 stars 28 forks source link

deno_bindgen does not work properly on Windows. #91

Closed skanehira closed 2 years ago

skanehira commented 2 years ago

Summary

deno_bindgen does not work properly on Windows.

Details

When I install latest deno_bindgen and run deno_bindgen in Windows(on GitHub Actions), the path of dll is incorrect. I think correct path is file:///D:/a/deno-clippy/deno-clippy/bindings/../target/debug/deno_clippy.dll

Check file:///D:/a/deno-clippy/deno-clippy/mod_test.ts
Check file:///D:/a/deno-clippy/deno-clippy/platform/mod_test.ts
Download file:///D:/a/deno-clippy/deno-clippy/bindings/..argetdebug/deno_clippy.dll
Uncaught error from ./mod_test.ts FAILED
running 2 tests from ./platform/mod_test.ts
read write text ... ok (1s)
error: Test failed
read write image ... ok (982ms)

 ERRORS 

./mod_test.ts (uncaught error)
error: (in promise) CacheError: D:\a\deno-clippy\deno-clippy\bindings\..argetdebug\deno_clippy.dll is not valid.
    throw new CacheError(`${path} is not valid.`);

CI result.

https://github.com/skanehira/deno-clippy/runs/8170198161?check_suite_focus=true#step:9:99

CI definition.

https://github.com/skanehira/deno-clippy/blob/fbbb1908a4220ec4b7c5e7b672d7d90ad71e4ea0/.github/workflows/ci.yaml#L64-L72

skanehira commented 2 years ago

Currently, deno_bindgen is only test in Linux. I think we should add macOS and Windows