Hello,
Couple weeks ago I took a journey of creating Bazel rules for Nim: https://github.com/kczulko/rules_nim.
I think it's more-less ready to be announced now. I've focused now only on the C code generation and interoperability with a C lang but it can be extended to JavaScript in the near future. Feel free to comment/use/build/contribute.
Project contains small README file and autogenerated Bazel docs.
Best regards, Karol
Honestly, I would expect the compatibility there :)