Skip to content

agama-project/zypp-c-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Now it is just POC to have thin C layer only for agama purpose on top of libzypp.

Repo Organization

Repository contains three directories:

  • c-layer that contain sources to build static library and in include directory C ready headers. The internal directory contains C++ headers that is used only for inter-communication and is private.
  • c-example is example pure C binary that is using static library and produce some output
  • rust is target rust code that should be used from Agama, but it is not ready yet.

How to Add New Libzypp Call

  • at first create its C API in c-layer/include directory and write its implementation to cxx file.
  • optionally you can try and verify functionality of that API in c-example directory
  • generate new FFI bindings (in low level, unsafe Rust), in rust/zypp-agama-sys
  • write a (regular, safe) Rust wrapper, in zypp-agama
  • optionally verify API and its functionality in zypp-agama-example
  • optionally run valgrind on example CLI to ensure there are no memory leaks. If code has tests and not have CLI usage, then valgrind can be run also on rust testing binary.

Libzypp Notes

  • libzypp is not thread safe
  • for seeing how it works see yast2-pkg-bindings and zypper as some parameters in calls are ignored
  • goal is to have thin layer close to libzypp and build logic on top of it in more advanced language

Interesting Resources

About

C layer on top of libzypp only for agama purpose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •