Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ Download the latest release for your platform from the [Releases page](https://g
| **Windows** | `.exe` installer or `.msi` |
| **Linux** | `.AppImage`, `.deb`, `.rpm`, or `.tar.gz` |

> **Note for Linux deb/rpm users**: The server component requires [wasmtime](https://wasmtime.dev/). Install it with:
> ```bash
> curl https://wasmtime.dev/install.sh -sSf | bash
> ```

### Other Installation Methods

| Method | Command |
Expand Down
12 changes: 11 additions & 1 deletion src/rustfava/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

import click

# Version for PyInstaller builds where importlib.metadata is unavailable
__version__ = "0.1.8"

try:
from importlib.metadata import version as get_version

__version__ = get_version("rustfava")
except Exception: # pragma: no cover
pass


class AddressInUse(click.ClickException): # noqa: D101
def __init__(self, port: int) -> None: # pragma: no cover
Expand Down Expand Up @@ -93,7 +103,7 @@ def _add_env_filenames(filenames: tuple[str, ...]) -> tuple[str, ...]:
@click.option(
"--poll-watcher", is_flag=True, help="Use old polling-based watcher."
)
@click.version_option(package_name="rustfava")
@click.version_option(version=__version__)
def main( # noqa: PLR0913
*,
filenames: tuple[str, ...] = (),
Expand Down
8 changes: 6 additions & 2 deletions src/rustfava/rustledger/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ def is_encrypted(self, filepath: str) -> bool:
"""
# Resolve to absolute path for WASM file access
file_path = Path(filepath).resolve()
allow_dir = str(file_path.parent)
# Use root "/" to allow include paths with ".." (parent directory references)
# This matches native beancount behavior where includes can reference any path
allow_dir = "/"
result_json = self._run(
["is-encrypted", str(file_path)],
allow_dir=allow_dir,
Expand Down Expand Up @@ -438,7 +440,9 @@ def load_full(
- loaded_files: List of all resolved include files
"""
file_path = Path(filepath).resolve()
allow_dir = str(file_path.parent)
# Use root "/" to allow include paths with ".." (parent directory references)
# This matches native beancount behavior where includes can reference any path
allow_dir = "/"

# Build command args
args = ["load-full", str(file_path)]
Expand Down