Revert non-working fix aiming to support docs.rs #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I originally provided a PR #82 (merged) for this issue: #72
I have since discovered more about Rust compilation and procedural macros and realised my "fix" doesn't work as per this: rust-lang/docs.rs#1823
The two issues with attempting to use
OUT_DIR
:build.rs
exists.build.rs
exists), thedeno_bindgen_macro
will output to${OUT_DIR}/bindings.json
as expected, but thecli.ts
does not have OUT_DIR defined and will default to looking forbindings.json
in the current working folder.I also see that my "fix" introduced another issue which was fixed here: #89
After learning more and understanding more... I humbly submit a PR which:
On my journey, I have also discovered that the issue of procedural macros having side-effects has been discussed elsewhere: rust-lang/cargo#9084
It would seem this issue is a general issue with using procedural macros for outputting auxiliary data and out of my league in terms of resolving.
I am not sure what the solution is, but for now I will have to put up with the fact that when my project makes use of deno_bindgen I can't refer to the generated Rust docs on docs.rs...