riscv-software-src / riscv-unified-db

Machine-readable database of the RISC-V specification, and tools to generate various views
Other
6 stars 7 forks source link

Offline Visualization #79

Open AFOliveira opened 1 week ago

AFOliveira commented 1 week ago

As of now all images are hosted in kroki.io, is there any specific reason for that. I do realize this is low priority, but for future purposes I believe that we should try to avoid to rely on this external tools, right? Offline visualization: image

dhower-qc commented 1 week ago

Yes, we should. The only reason we're using that is because the only public plugin for wavedrom in Asciidoctor.js (needed by Antora) uses Kroki. To fix this, we'll need to write a custom plugin.

AFOliveira commented 1 week ago

Thanks for the clarification! As I said I don't see this as any problem for now, so I raised the issue just so we can keep track of this. Just as a curiosity question, I believe the riscv-isa uses wavedrom, can't we use it here?

dhower-qc commented 1 week ago

We are using wavedrom. The issue is that there are multiple asciidoctor plugins for wavedrom that can only be used with certain tools.

riscv-isa-manual uses the Ruby backend ('asciidoctor'), and the wavedrom plugin for that generates and stores wavedrom images locally. riscv-unified-db also uses the Ruby backend to create PDFs.

However, the tool being used to create the html ISA manual out riscv-unified-db is Antora, which can only use a JavaScript backend ('asciidoctor-js') of Asciidoctor. The wavedrom plugin for asciidoctor-js is what generates those on-demand image links using Kroki. (For what it's worth, Bill Traynor from RVI has an Antora version of riscv-isa-manual, and it has the same on-demand image issue).

AFOliveira commented 1 week ago

Got it! Thanks for the explanation!