You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
forc-doc generates a static documentation website from sway code (specifically, from the sway compiler output).
Sway primitives are, however, written in Rust. We need a way for forc-doc to generate docs for the primitive types and include them as a submodule in the sway-lib-std docs. Some possible solutions:
rust-doc
Maybe we can use rust doc just for the std library for those files and splice them into the forc doc result somehow. rust-doc wouldn’t show usages or trait implementations though, since those are written in sway.
Generate primitive definitions in sway
Maybe there’s a way to generate sway code from the primitive type definitions in rust. If we could generate valid sway code and include it in the lib-std package, forc-doc would generate docs for it.
Custom plugin for generating primitive docs
We could write a custom plugin like forc-doc-primitives that generates docs for the primitives.
Open to other ideas/suggestions!
The text was updated successfully, but these errors were encountered:
forc-doc generates a static documentation website from sway code (specifically, from the sway compiler output).
Sway primitives are, however, written in Rust. We need a way for forc-doc to generate docs for the primitive types and include them as a submodule in the sway-lib-std docs. Some possible solutions:
rust-doc
Maybe we can use rust doc just for the std library for those files and splice them into the forc doc result somehow. rust-doc wouldn’t show usages or trait implementations though, since those are written in sway.
Generate primitive definitions in sway
Maybe there’s a way to generate sway code from the primitive type definitions in rust. If we could generate valid sway code and include it in the lib-std package, forc-doc would generate docs for it.
Custom plugin for generating primitive docs
We could write a custom plugin like
forc-doc-primitives
that generates docs for the primitives.Open to other ideas/suggestions!
The text was updated successfully, but these errors were encountered: