Where to start with the current Harding runtime, web stack, and package workflows
git clone https://github.com/gokr/harding.git
cd harding
nimble harding
# Optional install
nimble install_harding
Requires Nim 2.2.6 or later.
harding
harding script.hrd
harding -e "3 + 4"
harding --ast script.hrd
harding --loglevel DEBUG script.hrd
Use the interpreter for interactive work and Granite for native builds.
granite compile myprogram.hrd -o myprogram
granite build myprogram.hrd --release
granite run myprogram.hrd
Compile Harding code to standalone native binaries.
MummyX is Harding's current web server path: a fast scalable native multithreaded HTTP server, with Harding handlers executed through the interpreter's green-process model.
"Hello, World!" println| c |
Counter := Object derive: #(count)
Counter>>initialize [ count := 0 ]
Counter>>value [ ^ count ]
Counter>>increment [ ^ count := count + 1 ]
c := Counter new.
c initialize.
c increment.
c value printlnresult := [
10 // 0
] on: DivisionByZero do: [:ex |
ex resume: 0
].
result printlnHarding load: "lib/mummyx/Bootstrap.hrd".
Server := HttpServer new.
Router := Router new.
Router get: "/" do: [:req |
req respondHtml: "<h1>Hello</h1>"
].
Server router: Router.
Server serveForever: 8080.Syntax highlighting, language-server features, and debugger integration.
nimble bona
./bona
Launcher, Workspace, Transcript, Browser/Inspector work, and the Application Builder workflow.