diff --git a/docs/_docs/configuration.md b/docs/_docs/configuration.md index 8f9bf28..686218f 100644 --- a/docs/_docs/configuration.md +++ b/docs/_docs/configuration.md @@ -13,6 +13,38 @@ title: Configuration {:toc} --- +## Configuration + +Rhino supports reading configuration from configuration files in the upcomming release (> 1.8.0) + +By default, rhino reads the configuration from +- `rhino.config` file from current class' classpath +- `rhino.config` file from current threas's classpath +- `rhino.config` file from current directory +- `rhino-test.config` file from current class' classpath +- `rhino-test.config` file from current threas's classpath +- `rhino-test.config` file from current directory +- env variables (normally starting with "RHINO_") +- System-properties (normally starting with "rhino.") + +Properties can be specified in camel case dot notation (e.g. `rhino.printICode=true`) or in upper case underscore notation (e.g. `RHINO_PRINT_ICODE=true`) + +Currently available flags: +- `rhino.stack.style` default value `rhino`. Available `mozilla`, `mozilla_lf`, `v8` +- `rhino.printTrees` default value `false` +- `rhino.printICode` default value `false` +- `rhino.debugLinker` default value `false` +- `rhino.use_java_policy_security` default value `false` + +### Notes for contributors + +When adding a new feature to the rhino codebase through multiple PRs, consider using a feature flag such as `rhino.FEATURENAME.enabled` for easy toggling. + +Experimental features should be disabled by default and may be enabled for testing in `rhino-test.config`, respectively in `rhino.config` in your application. + +When a feature is mature enough, the default value can be changed to true or the feature flag can be removed completely. + + ## Optimization levels The currently supported optimization settings are: