jcornaz / heron

[DISCONTINUED] An ergonomic physics API for bevy games
MIT License
292 stars 44 forks source link

docs(guide): Add a quickstart section #70

Closed faassen closed 3 years ago

faassen commented 3 years ago

I've written a very basic quickstart. I've ensured this code actually works so you can copy and paste it.

mdBook automatically adds a "run" button that doesn't work for me - perhaps we need to find a way to disable it if we can't make it work.

I've also added a features.md document which is just a todo list for other things I intend to write about.

To ensure full code examples work we could try to figure out how to set up a sub-package and then include the code directly using the mdBook #include directive. I could place the code in the examples directory of the main package, but perhaps there's a better place.

faassen commented 3 years ago

There are some test failures I do not comprehend - it appears it cannot compile the code in it, and this code actually does work so it must be some dependency setup that is missing?

jcornaz commented 3 years ago

Great, thanks.

mdbook test doesn't work because of the third party dependencies. see https://github.com/rust-lang/mdBook/issues/706

So I use rust-skeptic to test the documentation. It has some limitations that usual rust doc doesn't have:

  1. The examples need a main function (by default)
  2. You may have to explicitly recompile cargo build (If you still have problem try removing the target folder)

I'll have a look at it tonight. Thanks for the help!

jcornaz commented 3 years ago

@faassen That example requires the "full" bevy engine and needs to render graphics on screen. This kind of example can be tagged no_run so that they are checked for compilation, but are not executed.

faassen commented 3 years ago

Thanks, that fixes the few items I was blocked on. I will try to find time to write some more later.

faassen commented 3 years ago

Nothing appears to be blocking a merge now, I think. Just for clarification: further text will arrive in the form of future PRs.