From d3f4169d76603526a458d0c73ac84ac97e219f5c Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 6 Oct 2018 16:00:47 +0100 Subject: [PATCH] Update readme --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 50c8fc2..190898e 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,27 @@ loot-condition-interpreter ========================== An experimental library for parsing and evaluating LOOT's metadata condition -strings. Written in Rust. Very incomplete. +strings. This library improves upon LOOT's existing implementation in the +following ways: -Goals: +- Condition expressions are parsed into an intermediate representation instead + of being stringly typed, which allows parsing and evaluation to be separated. +- State is uncoupled by necessity, and Rusts's concurrency guarantees mean it + can be accessed more efficiently. +- Results are cached with more granularity, per function instead of per + expression, improving performance when expressions are not entirely different. +- Result caching is guided by benchmarks, so results aren't cached + unnecessarily. +- Reading executable versions doesn't involve calling out to the shell and + piping several commands together when on Linux. -- [x] Explore parsing conditions into an intermediate representation, then - evaluating from that representation. LOOT's current parser evaluates - conditions while parsing them, tightly coupling the two operations. -- [ ] Explore more granular result caching. LOOT's current caching maps each - condition string to its result, which can't re-use results in compound - conditions. -- [x] Explore round trip serialisation from the intermediate representation. -- [ ] Evaluate the cost/benefit of integrating into LOOT, replacing the existing - code. +The code is also not as much of a mess, it's got benchmarks, and probably better +test coverage. + +The library is still experimental because it currently lacks: + +- an FFI for LOOT to call it through. +- good error handling, details about parsing errors are not exposed. The tests need the [testing-plugins](https://github.com/WrinklyNinja/testing-plugins) and the [LOOT API v0.13.8](https://github.com/loot/loot-api/releases/tag/0.13.8)