Crates.io | trixy |
lib.rs | trixy |
version | 0.4.0 |
source | src |
created_at | 2023-12-23 18:59:52.91196 |
updated_at | 2024-07-25 13:32:32.404102 |
description | A rust crate used to generate multi-language apis for your application |
homepage | |
repository | https://codeberg.org/trinitrix/trixy |
max_upload_size | |
id | 1079247 |
size | 687,216 |
A crate to generate a multi-language foreign function interface.
Trixy only needs:
clang-format
to format the generated c header files.The API to generate is specified in a Trixy file. The language of these files is an subset of rust and should thus be easy to learn and pick up.
A grammar file is provided here encoded in Extended Backus-Naur Form.
The grammar file is rendered as railroad diagrams in PDF here, run ./docs/generate_docs
to regenerate the PDF file.
Trixy contains integration tests in the ./tests
directory. These are maintained with the
./scripts/tests.sh
script. Take a look at it's --help
output for further usage
information.
This crate also contains a binary, which can help with manual testing and inspecting of the
generated AST. The cargo run --features 'build-binary' -- --help
output should provide
all required information.
Tests are (as of now) only positive, i.e. they can only test successful situations. Failing test will probably be supported in the future.
We have a nix flake, which provides the required dependencies to work with Trixy and the associated scripts in the ./scripts
directory.
Please also make sure to run the ./scripts/renew_copyright_header.sh
after you added a new file, to ensure that every file contains a license header.