Commit Graph
18 Commits
Author SHA1 Message Date
Oliver Hamlet 84a8ef55d1 Remove libc FFI dependency
It was only used for a single type alias that's currently usize on all platforms, so using it was overkill. This removes libc from the dependency tree on Windows, but not on Linux, though there it's only needed for dev dependencies.
2025-12-06 12:47:47 +00:00
Oliver Hamlet b45ace0700 Improve FFI error message handling 2025-04-28 17:48:20 +01:00
Oliver Hamlet 9c4f9dcb5e Deny a lot of extra lints and fix their errors 2025-04-26 10:10:48 +01:00
Oliver Hamlet d7f5455cd0 Swap out some libc type aliases with std::ffi equivalents
Unfortunately std::ffi::c_size_t is currently experimental, and if I
define c_size_t = usize myself then cbindgen doesn't recognise it
properly and makes c_size_t a typedef of uintptr_t instead of just
replacing it with size_t.
2025-02-01 17:58:12 +00:00
Oliver Hamlet d9c453a857 Use c_int instead of i32 in error types
To match the types used by the actual error mappers. c_int is a type alias of i32 on the platforms that this library is used on, so there's no practical difference.
2025-02-01 17:58:12 +00:00
Oliver Hamlet a8f9a5734a Make Error and GameType enums non-exhaustive
So that it's not a breaking change to add more variants in the future.
2025-01-29 18:38:24 +00:00
Oliver Hamlet 9e2aa0cf9c Add support for OpenMW .omwaddon and .omwgame plugins 2025-01-29 18:38:24 +00:00
Oliver Hamlet c21391568c Add context to Error::ParsingIncomplete 2024-05-02 20:54:56 +01:00
Oliver Hamlet 30c140eb4d Add support for Starfield
As far as loot-condition-interpreter is concerned, it's not really any
different from Fallout 4.
2023-09-05 18:48:44 +01:00
Oliver Hamlet aff9d546f1 Add support for additional data paths
The Microsoft Store installs Fallout 4 DLCs into separate game
directories, so allow them to be provided for evaluating conditions.
2023-04-23 11:31:25 +01:00
Oliver Hamlet aa3dabab8d Apply changes suggested by clippy lints 2022-01-23 22:17:35 +00:00
Oliver Hamlet 860995638c Rename LCI_GAME_* constants to use fewer acronyms
A minor quality of life improvement, to break the FFI compatibility in
step with the Rust library.
2019-06-30 11:25:23 +01:00
Oliver Hamlet 52792626af Update to Rust 2018 syntax 2019-06-30 11:25:23 +01:00
Oliver Hamlet 6cfefc6c31 Rename GameType variants to use fewer acronyms
A minor quality of life improvement since the nom 5 update is a
breaking change.
2019-06-30 11:25:23 +01:00
Oliver Hamlet 4db34be2c9 Upgrade to nom v5
Error handling has changed, affecting the error variants LCI exports,
and macros are replaced by functions, so all the parsing code has been rewritten.
2019-06-30 11:25:23 +01:00
Oliver Hamlet f039ba397f Add GameType::Tes3 for Morrowind support 2019-04-07 12:20:10 +01:00
Oliver Hamlet 529e4fc6d1 Error if not all the input is consumed when parsing expressions 2019-01-26 09:44:33 +00:00
Oliver Hamlet c0bea60673 Add FFI wrapper crate 2018-10-20 21:13:33 +01:00