PMunch / protobuf-nim

Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools
MIT License
171 stars 14 forks source link

documentation issues #6

Closed timotheecour closed 6 years ago

timotheecour commented 6 years ago
type
  our_package_ExampleMessage = object
    simpleField: int32

instead of:

type our_package_ExampleMessage = object simpleField: int32

And you can use it like this:

let message = newTest1()
setA(message, 150)
let pbso = newProtobufStream(newFileStream(stdout))
writeTest1(pbso, message)
PMunch commented 6 years ago

Triple backticks are used to mark code blocks in markdown, but this is ReStructured Text. Since Nim uses RST for it's documentation I wrote it once in RST and then wrote a simple script that extracts the RST from the module definition and puts it into a README file. I'll look into specifying syntax though for proper highlihting, and I'll make sure it renders well both in the documentation and the GitHub page. To generate the full documentation run nim doc protobuf.nim.

I'll add a short howto snippet as well.

Hmm, I'm not sure if I even have a Nim forum account. But I guess this is a good a time as any to create one 😃

PMunch commented 6 years ago

Fixed the formatting now, and added an example. Let me know if it's not clear enough, I tried to keep it brief but informative.

timotheecour commented 6 years ago

Hmm, I'm not sure if I even have a Nim forum account. But I guess this is a good a time as any to create one 😃

just replied there: https://forum.nim-lang.org/t/3687/1#23112

PMunch commented 6 years ago

Yeah I commented as well, but I guess my brand new account might be under moderation if you didn't see it? Does the documentation look good by the way, should I close this issue?

timotheecour commented 6 years ago

not seeing your reply, maybe under moderation indeed... shd be fast (if still doesn't work, maybe ask on gitter or irc?) ya, thanks, closing!