Skip to content

Literate Programming

brett hartshorn edited this page Apr 3, 2015 · 3 revisions

Rusthon supports literate programming using markdown files. http://en.wikipedia.org/wiki/Literate_programming Multiple languages can be embedded in the markdown file, for each fenced code block marked with a language header. The supported languages are:

  • rusthon
  • c++
  • go
  • rust
  • javascript
  • html
  • java
  • nim

Each code block is assembled, and compiled if required. This allows you to write clearly documented, client and server code, all in a single file. Having everything in one place also makes it simpler to audit and secure your code.

<@NAME> is special syntax allows you to insert the javascript output from Rusthon's javascript backend, into HTML code blocks. @NAME is given on the line before a Rusthon code block to tag its output for insertion into the final HTML.

https://github.com/rusthon/Rusthon/blob/master/examples/hello_threejs.md https://github.com/rusthon/Rusthon/blob/master/examples/hello_angular.md

Sidebar

Clone this wiki locally