sysrepo-crystal
sysrepo-crystal
These are crystal bindings for the sysrepo library.
These bindings are compatible with the master branch of sysrepo v1.0 and above ( legacy is not supported ).
The bindings themselves are heavily based on the CPP bindings located in the same repo.
Can be used in conjunction with the libyang-crystal bindings for the libyang library.
libsysrepo-crystal
As part of the bindings, a small shim will be generated upon install, libsysrepo-crystal.a
.
This shim is used to facilitate integration with the sysrepo API.
The sysrepo API requires an opaque pointer to be created on the application side and provided to the sysrepo API where it will be populated.
I could not find a to create a null opaque pointer within crystal (application side ) and then provide it to the sysrepo API via the crystal binding methods that worked.
Therefore the shim was created to extend the sysrepo API by providing C functions that return null opaque pointers for various sysrepo types.
Prerequisites
sysrepo will need to be installed on your system, which itself requires libyang to be installed.
For installation instructions, please see their respective repos linked above.
Installation
-
Add the dependency to your
shard.yml
:dependencies: sysrepo-crystal: github: smalls12/sysrepo-crystal
-
Run
shards install
Usage
require "sysrepo-crystal"
Examples can be found in the sysrepo-crystal-examples repo:
Contributing
- Fork it (https://github.com/your-github-user/sysrepo-crystal/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- smalls12 - creator and maintainer
sysrepo-crystal
- 0
- 0
- 0
- 0
- 1
- almost 5 years ago
- February 29, 2020
MIT License
Sun, 22 Dec 2024 19:31:46 GMT