3 ms·
I've been using this macro in my personal projects repo: https://pastebin.com/raw/atNtPgwv https://pastebin.com/raw/atNtPgwv The three big gotchas with this ar
by bytearray64 5y ago
I've been using this macro in my personal projects repo: https://pastebin.com/raw/atNtPgwv https://pastebin.com/raw/atNtPgwv
The three big gotchas with this are:
- You need to name the rule the same as the module you've exported in Rust
- It creates a copy to get the naming right. You could write an actual rule instead of a macro that just makes a symlink with the right name for Python to pick it up.
- Since the macro just exposes a genrule and isn't a PyInfo provider, you need to add it in the data of the py_library/binary you intend to use it in. Again, could be fixed by an actual rule impl.