Commit Graph

16 Commits

Author SHA1 Message Date
Benedikt Peetz c9622c15bc
fix(gitignore): Don't ignore the `Cargo.lock` file 2024-05-20 15:33:39 +02:00
Benedikt Peetz 2e92028de2
feat(src/macros)!: Store allocation location in all stringsThis makes it possible to automatically free the string in the correctway expected by both c and rust.Rust strings can now just be freed by the rust allocator, whilst cstrings are forgotten, so that the c allocator may free them.BREAKING CHANGE: All usage of explicit mentions `std::string::String` in your `handle_cmd` function will need to be replaced by `trixy::types::newtypes::String`. Otherwise these types should provide the same methods. 2024-05-20 15:33:36 +02:00
Benedikt Peetz ed4a113141
fix(example/main): Ignore generated `api.rs` debugging file 2024-05-20 15:33:22 +02:00
Benedikt Peetz 7f6c76a6a6
docs(example/main): Update to include newly added callbacks 2024-03-27 22:36:17 +01:00
Benedikt Peetz 5ab2bbb8fd
chore(treewide): Update license header 2024-03-26 20:11:23 +01:00
Benedikt Peetz 2b4599592c
chore(treewide): Add or update license header 2024-03-26 19:58:24 +01:00
Benedikt Peetz d48456d039
test(tests): Add the positive tests (and delete the ones in rust)
The rust based test were both not sufficient to cover all edge-cases and
so unmaintainable that they nearly always didn't even compile. This new
test framework should alleviate both concerns.
However, one big problem still remains: it does not support test cases
that should fail, so these have just been left in the `./tests`
directory.
2024-03-26 17:35:30 +01:00
Benedikt Peetz eb3156753a
feat(example/valgrind): Add a script to test the c example with valgrind 2024-03-26 17:35:16 +01:00
Benedikt Peetz f688df1248
docs(example): Update the example c and tri file to latest progress 2024-03-26 17:35:13 +01:00
Benedikt Peetz d2d18d905e
chore(example): Switch to full trinitrix API 2024-03-26 17:35:12 +01:00
Benedikt Peetz 938e038075
refactor(types/headers/string): Don't typedef a string type
This really does not add anything, and just using `const char*` directly
keeps things more clear.
2024-03-24 17:59:19 +01:00
Benedikt Peetz cd5b0c9ee4
refactor(example/main/c): Deduplicate error handling function 2024-03-24 17:52:36 +01:00
Benedikt Peetz 5ce46a1568
fix(trixy/examples/main): Improve c code 2024-02-19 20:58:21 +01:00
Benedikt Peetz d904a19f48
style(treewide): Reformat with treefmt (`nix fmt`) 2024-02-19 20:53:11 +01:00
Benedikt Peetz 5a7bb00548
chore(treewide): Add the new license header 2024-02-19 16:13:55 +01:00
Benedikt Peetz e52f74b0c1
feat(treewide): Finalize basic c API
See the example under `./example/main/` for more details.
2024-02-19 15:50:30 +01:00