Commit Graph

11 Commits

Author SHA1 Message Date
Anand Krishnamoorthi
6eca85b497 Improve crate documentation (#111)
- Document QueryResults
- Delete snippets folder
- Document Value

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2024-01-19 14:51:14 -08:00
Anand Krishnamoorthi
723c9379a0 Add crate documentation (#106)
- Separate out public, unstable and internal APIs.
- Cleanup README.md and include it as the crate documentation.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2024-01-14 21:15:48 -08:00
Anand Krishnamoorthi
577e1aa8db More OPA conformance; in-progress: ability to trace interpreter (#63)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-12-16 17:50:59 -08:00
Anand Krishnamoorthi
ed3492fd7b Formalize concept of a Number (#55)
Number is implemented using rust_decimal::Decimal which uses a 96 bit mantissa.
TODO:
  a) Support u64, i64 variants
  b) Determine desired semantics for floating-point
  c) Determine desired big integer length
  d) Explore other big int/big float crates

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-12-01 08:45:59 -08:00
Anand Krishnamoorthi
3514594c56 Use Rc<str> instead of string. (#52)
This reduces std::mem::size_of::<Value>() to 16 bytes.
String values are also efficiently copied like Objects, arrays, sets etc.

When multiple function rules are evaluated, ensure that constant argument values
match before running the rule. If actual parameter does not match the constant parameter,
then the rule is skipped.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-11-24 17:45:49 -08:00
Anand Krishnamoorthi
b7420aceba Fix clippy warning (#25)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-09-27 08:40:36 -07:00
Anand Krishnamoorthi
b30fc2599c Builtin functions for numbers (WIP)
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30
Anand Krishnamoorthi
c92707433e Improvements to github workflow (#4)
- format check
- clippy checks
- build tests separately before running

Also fix clippy warnings

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-10 11:16:09 +05:30
Anand Krishnamoorthi
980a5d4772 Update name to regorus
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 20:33:39 -08:00
Ming-Wei Shih
c0972ad2ba Update license to MIT
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:35 +00:00
Anand Krishnamoorthi
cb0b3a1790 Code from github.com/anakrish/rego-rs
Authored by anakrish and mingweishih

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 10:56:54 -08:00