Skip to content
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

Properties File #2

Closed
7 tasks
dmgolembiowski opened this issue Oct 6, 2021 · 2 comments
Closed
7 tasks

Properties File #2

dmgolembiowski opened this issue Oct 6, 2021 · 2 comments

Comments

@dmgolembiowski
Copy link
Collaborator

My initial draft for the cargo-binrw file format is to leverage Ron and (for now) support only a single logging server with the following configurable properties:

  • project
  • host
  • port
  • editor_host
  • editor_port
  • silent_foreground
  • logging

If Ron is acceptable, I think it could look like:

Binrw([
    (
        project: my_project,
        host: "127.0.0.1"
        port: 42069,
        editor_host: "127.0.0.1",
        editor_port: 42070,
        silent_foreground: false,
        logging: Logging(
            enabled: false
            output_file: "$CARGO_MANIFEST_DIR/binrw.log",
            mode: 'a'
        ),
    ),
])
@dmgolembiowski
Copy link
Collaborator Author

dmgolembiowski commented Oct 6, 2021

Better yet, let's simplify things and create this as:

# {{ project }}.toml
[project]
name = "{{ project }}" # default project name is "my-binrw-project"
host = "{{ host }}" # default value is "127.0.0.1"
port = "{{ port }}"  # default value is "31958"
silent_foreground = false # output is not sent to stdout and stderr; a TTY is spawned if this is set to `true`. 

[logging]
enabled = false # logging is not enabled by default
output_file = "$CARGO_MANIFEST_DIR/binrw.log" # will panic if write permission is not available
mode = "append" # Viable modes: "append" and "overwrite"

@dmgolembiowski
Copy link
Collaborator Author

dmgolembiowski commented Oct 6, 2021

Closing this because corresponding issues will be opened for action items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant