Skip to content

[RFC] Missing parts of libc required for CivetWeb #16683

@PiotrZierhoffer

Description

@PiotrZierhoffer

Introduction

This issue is created as prompted by the discussion on the Networking Forum.

We are working on implementing support for CivetWeb HTTP library (https://github.com/civetweb/civetweb), but it requires improvements in the libc layer. It's a good example of an external project using sockets APIs that should be relatively easy to integrate with Zephyr, as a proof of concept.

Problem description

CivetWeb uses different POSIX API calls, as any application or library runnable on Linux.

Using Newlib is not an option due to heavy conflicts with the POSIX layer (see #13787).

Improving minimal-libc requires some consideration to maintain compatibility with other layers.

Here we list features missing from minimal-libc that would be required for CivetWeb to work.

Detailed RFC

Here is the list of functions that are used by CivetWeb, with pull requests were applicable.
For some we will prepare stub implementations that will be enough to get the library to work.

Dependencies

This is relevant to the POSIX and libc layers. Also time Infrastructure is affected.

CC: @pfalcon @nashif @rakons @andrewboie @jukkar @laperie @tgorochowik

Concerns and Unresolved Questions

The main purpose of minimal-libc is to be, well, minimal. Further work should preserve this approach.

Time related functions rely on a concept of current time. Right now there is no such thing in Zephyr.

There is a proposal by @pfalcon we were about to follow, using the work he submitted via #15602

Current status

As suggested by @nashif (see #16451), we will now proceed with including relevant functions in the sample itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions