Libspecinfra is a project to make the alternative of specinfra gem by Rust.
Specinfra gem is a base library of serverspec .
Specinfra gem is made of Ruby, so you cannot call the functions of specinfra from other languages.
Libspecinfra project will provide binary library and language bindings to call this library. So you will be able to call the functions of specinfra from many languages.
This project is in the phase of very beginning. If you have comments, questions and so on, feel free to post comments in GitHub Issues.
Here is the Japanese post about this project.
We provide only Ruby and mruby bindings currently.
Other languages will be supported.
This is a sample mruby code to get the permission of /etc/passwd
of local host:
```ruby b = Libspecinfra::Backend::Direct.new() s = Libspecinfra::Specinfra.new(b) f = s.file("/etc/passwd")
printf("%#o", f.mode) ```
This is a sample mruby code to get the permission of /etc/passwd
via SSH:
```ruby b = Libspecinfra::Backend::SSH.new("localhost") s = Libspecinfra::Specinfra.new(b) f = s.file("/etc/passwd")
printf("%#o", f.mode) ```
Other language examples are here .
Resources should be implemented. These resources are picked up from Resource Types of Serverspec . So some resources are implemented in serverspec, not in specinfra.
Platforms should be implemented. Specinfra gem supports these platforms.
Backends should be implemented. Specinfra gem supports these backends.