Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Support for an alloc feature? #322

Open
@cbeck88

Description

@cbeck88

I'm trying to port prost so that it can work in an alloc-only environment. Specifically we want to use it inside of an SGX enclave.

prost-derive is a proc-macro crate, that uses failure crate to do error handling. Unfortunately for us, it turns out that prost-derive uses failure::Error and failure::Bail, which require the feature failure/std. But because of long-standing issues in cargo, this means that failure crate will globally be std, and so our no_std, alloc-only targets won't build that are using failure crate.

There's a separate issue in cargo project so that deps of build.rs and proc-macro don't infect the rest of the build but it's a long way away as I understand.

Are you interested in a patch that adds an alloc feature to failure crate and makes more of failure crate, specifically the macros, work in alloc mode?

I'm trying to decide if the best way forward for our project is to patch prost-derive away from using failure crate, or to try to make these parts of failure crate more portable.

Metadata

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