Skip to content

Add no_std support so rc-zip can be used in embedded enviroments. #98

Open
@jacobguenther

Description

Motivation:
Reading zip files on SD cards on micro controllers.

Work Required:
The only non optional dependency that actually needs the standard library is oval. I haven't looked at the optional dependencies yet. All of the other dependencies have a feature flag "std" enabled by default which can be disabled.

Oval is a very small library and could be re-implemented to not use the std library. It relies on std::io::{Read, Write, Result}. These could be replaced with embedded_io Read Write and Error. The core library does not have traits for Read and Write.

A new feature would need to be added, normally called "std". And enabled by default.

Something like
`
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::borrow::Cow;
#[cfg(feature = "std")]
use std::borrow::Cow;

#[cfg(not(feature = "std"))]
use core::cmp;
#[cfg(feature = "std")]
use std::cmp;
`
would have to be done. Or just use the core library.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions