You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
As a temporary workaround, I have republished this crate as alt-failure on cargo, so that I can make prost-derive depend on it instead of failure crate in my project, but renaming it to failure in prost-derive Cargo.toml so that no code changes in prost-derive are needed for this issue. Then the proc-macro is free to use std without causing std to infect the main target. Would love a better solution
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to port
prost
so that it can work in analloc
-only environment. Specifically we want to use it inside of an SGX enclave.prost-derive
is aproc-macro
crate, that usesfailure
crate to do error handling. Unfortunately for us, it turns out thatprost-derive
usesfailure::Error
andfailure::Bail
, which require the featurefailure/std
. But because of long-standing issues in cargo, this means thatfailure
crate will globally bestd
, and so ourno_std
,alloc
-only targets won't build that are usingfailure
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 tofailure
crate and makes more offailure
crate, specifically the macros, work inalloc
mode?I'm trying to decide if the best way forward for our project is to patch
prost-derive
away from usingfailure
crate, or to try to make these parts of failure crate more portable.The text was updated successfully, but these errors were encountered: