Parasol's main executable is located in the root folder of our distribution as parasol. This tool allows you to run Fluid scripts with the .fluid extension.
Run the tool with --help to see the available options and confirm that the install worked correctly. At the time of writing, this looks as follows:
This command-line program can execute Fluid scripts and PARC files developed for the Parasol framework.
parasol [args] [script.ext] arg1 arg2=value arg3 ...
The following parameters can be used when executing script files:
--procedure [n] The name of a procedure to execute.
--time Print the amount of time that it took to execute the program.
--dialog Display a file dialog for choosing a script manually.
--statement Instead of running a script file, executes a single statement or expression.
--log-api Activates run-time log messages at API level.
--log-info Activates run-time log messages at INFO level.
--log-error Activates run-time log messages at ERROR level.
--jit-options Development options that control the behaviour of the compiler.
--version Prints the version number on line 1 and git commit on line 2.
The --jit-options parameter accepts a comma-separated list of development options that control the Fluid compiler's behaviour. These options are primarily useful for debugging scripts, diagnosing parser issues, and profiling performance.
Usage:
parasol --jit-options trace-tokens,dump-bytecode script.fluid
| Option | Description |
|---|---|
diagnose |
Continues parsing after the first error to report all syntax issues. |
dump-bytecode |
Prints a disassembly of bytecode instructions after parsing. |
profile |
Enables timers to profile JIT parsing and configures run-time profiling. |
tips |
Print tips that address performance and code quality issues. |
top-tips |
Print important tips that relate to type safety and correctness issues only. |
all-tips |
Print all tips and style suggestions (noisy). |
trace |
Enables parser tracing; intended for AI agents only. |
Example scripts are provided in the examples folder of this distribution. We recommend starting with the widget example as follows, where install-path and source-path are replaced appropriately:
[install-path]/parasol --log-error [source-path]/examples/widgets.fluid
Tip
Try running a second time with --log-api to observe run-time log output while toying with the example. Try a few of the other examples to get a feel for what you can achieve, and load them into a text editor to see how they were created.
If parasol is run without command-line arguments, it will check for the presence of a package.zip file in its folder, mount it as a filesystem named package: and then attempt to execute package:main.fluid. This behaviour makes it possible for you to distribute your scripts as portable projects with minimal effort. The parasol executable should be renamed to the name of your project so that your end users will associate the executable with your application.