D 2021-03-13T18:51:16.015 L home N text/x-markdown P f582309163011e28f975901a41fab5da69c584b2 U stephan W 9058 # libfossil: Fossil SCM Library API (If you are reading this via [fossil-scm.org](https://fossil-scm.org/libfossil), be aware that that's a read-only mirror. The canonical home is [](https://fossil.wanderinghorse.net/r/libfossil).) See also: [](TODOs), [](download), [](building), [f-apps][], [](DbFunctions), [](SQLSnippets), [](HackersGuide), [doxygen docs][doxygen-docs] (refreshed from current sources relatively frequently). This source code repository houses an in-development C99-compliant library API for the [Fossil SCM][home-fossil]. The primary goal is to port existing behaviour into a library form (the fossil app is extremely monolithic in nature). This effort, officially called "libfossil", intends to provide an alternative interface into fossil repositories, as opposed to a replacement for the core fossil application. It does not aim to provide 100% feature-parity with the main app - see [](TODOs) for details about features which are considered out of scope or otherwise unlikely. It's intended to enhance one's ability to access and manipulate fossil repositories, not to supplant the main fossil application. The [f-apps][] page demonstrates what features are currently ported over. This code currently doesn't do much which would interest non-Fossil hackers. It might be of interest to those wanting to follow or participate in the design of libfossil. **License:** same as Fossil: the "2-Clause BSD" a.k.a. "FreeBSD License". # Update Feb. 2021: Back from the Dead After a 6-year forced hiatus due to chronic RSI, libfossil is again making some headway. In early Feb. 2021 its hashing support was brought up to date with regard to fossil's hardened SHA1 and SHA3-256 hashes. That was the major technical hurdle preventing further progress, so now they way is clear (or clearer) for bringing the library into the 2020's. A chat room and forum have been established for this effort but they are currently limited to developers. Please [get in touch][home-sgb] if you are a participant and need info about either. This project is *currently* only opened to active participants of the [Fossil SCM][home-fossil] project (as committers and/or forum participants). That said, it does not require the same code release waiver which that project requires. If/when the project reaches a client-usable state, it will be opened up for wider participation. [home-sgb]: https://wanderinghorse.net/home/stephan/ [home-fossil]: https://fossil-scm.org [f-apps]: /doc/ckout/f-apps/ ## Status, [](TODOs), and Whatnot All of this code is an experiment, and it does not represent a commitment by anyone. It is alpha quality. What's there works but is subject to change and there is still a great deal of the higher-level SCM bits left to port in and refactor to make them usable via library-style interfaces. Anyone looking for a project roadmap/timeline is asked respectfully to look elsewhere - there is no timebox on nor schedule for this project/experiment. That said: the [f-apps][] demonstrate what functionality is working. The code changes can be followed via [the timeline](/timeline). The current public (and documented) API can be found in [the header files](/dir?name=include/fossil-scm), and occasionally that gets [exported to doxygen][doxygen-docs]. # "Rules" for Code Contributors * When working on bits which themselves write to the repository, e.g. creating checkins, please be *exceedingly careful* not to corrupt the db :-D. The library has several layers of defense against the injection of problematic control artifacts, but still... be careful. * Please try to conform to the rough overall coding style (as initially laid out by Fossil v1). We're not picky about whether or not spaces belong before/after an `if`, but the general overall style should be *more or less* uniform. * Please build with the highest possible warning level and enable fatal warnings (in GCC and similar compilers: `-Wall -Werror -pedantic`). * The trunk currently has no stability guarantees and is very much in flux, so feel free to work there instead of a branch if you like. Insofar as possible/reasonable, using libfossil's own [f-apps][] for working with the repository is recommended (e.g. using `f-checkin` to perform checkins). There is nothing holy or sacred about this repo, so feel free to hack at will. Most of the library's sanity tests are packaged in [f-sanity.c](/finfo?name=f-apps/f-sanity.c). See [fossil-cli.h](/finfo?name=include/fossil-scm/fossil-cli.h) for a mini-framework to bootstrap new apps and [f-apps][].