Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve testing by translating the Matlab C API examples to Rust using matlab-sys #1

Open
Tastaturtaste opened this issue Feb 15, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Tastaturtaste
Copy link
Owner

Improve testing

Currently only a small subset of the whole Matlab C API gets tested using the subset of examples translated to Rust which can be found in ./mex-examples. While this already validates the linking directives needed to link against libraries provided by Matlab it would be better if a bigger surface of the exposed C API could be tested to make sure the bindings work correctly and nothing is missing.

Workflow

  1. Pick a C-example provided by Matlab in matlabroot/extern/examples/ that is missing
  2. Make a new cdylib library crate in ./mex-examples with the name of the example (words should be separated by '-' for consistency) and matlab-sys as a path dependency
  3. Translate the C-example you picked while staying close to the structure of the C-example
  4. Add the exact name of the translated example package to TEST_EXAMPLES in file ./xtask/src/test.rs
  5. Add at least one matlab unit test for the translated example to the file ./xtask/src/test.m. Follow the examples provided by the other tests or the documentation from Matlab.
  6. Run the tests (cargo xtask test) to make sure everything works. If the new test fails validate your translation of the C-example and the test case you added to test.m. If both are correct open an issue describing the problem.
@Tastaturtaste Tastaturtaste added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant