Skip to content

Provide documentation for reading config files #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/_docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down