Targets
About targets
Keen currently supports two targets: Java and JavaScript. The default is Java.
Commands that use Java:
keen foo.keenkeen run foo.keenkeen build foo.keenkeen test foo.keen(see Tests)
Commands that use JavaScript:
keen run foo.keen --node-jskeen build foo.keen --out foo.jskeen test foo.keen --node-js
The target is considered global state.
So, non-global, non-unsafe functions behave the same regardless of the target.
Some functions only work on a particular target.
A function that only works in Java will use the java spec.
A function that only works in JavaScript will use the js spec.
Testing the target
It's possible to call a java or js function from a regular function
by first testing java or js.
These are functions returning bool, but Keen treats them specially.
The functions java and js are global, since the target is considered global state.
Use trusted to erase global if the behavior is the same in any target.
Main target
A main function can use a target.