Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upno_std support #138
Comments
This comment has been minimized.
This comment has been minimized.
|
Yeah, sure! I guess it would mean disabling the error chain, and maybe the backtrace. |
This comment has been minimized.
This comment has been minimized.
lucab
commented
May 31, 2017
•
|
Bump of this. I'd like to see a backtrace-less |
This comment has been minimized.
This comment has been minimized.
|
I'm going to take a crack at this |
This comment has been minimized.
This comment has been minimized.
|
Okay, hit a snag: error-chain heavily depends on std::error, but it is not available in core. Unless anyone knows of a resolution, this seems like a bit of a showstopper. |
tarcieri
closed this
Jun 3, 2017
tarcieri
reopened this
Jun 3, 2017
This comment has been minimized.
This comment has been minimized.
|
Went ahead and reopened this as on a second look I think it might be possible to gate |
tarcieri
added a commit
to voucher/veriform
that referenced
this issue
Jun 3, 2017
This comment has been minimized.
This comment has been minimized.
|
I attempted to vendor a minimalist version of the I'm beginning to think this might be more trouble than it's worth. |
This comment has been minimized.
This comment has been minimized.
|
Okay, so I managed to get error-chain to work with no_std, but it's not pretty: I'm not sure I'd actually want to use this unless I could get it upstream, and I think there's definitely a lot of cleanup that needs to happen first. That said, the tests pass and |
This comment has been minimized.
This comment has been minimized.
|
Current resolution is to push the Error trait further down into probably the alloc crate, which will make this easier. |
This comment has been minimized.
This comment has been minimized.
|
Hum, but if you user no_core, you don't have access to alloc, do you? |
This comment has been minimized.
This comment has been minimized.
|
You can allocate from I have been trying to figure out the least horrible way to do this over on the https://github.com/carllerche/bytes/pull/153/files#r127882795 What I ended up settling on was having separate The This approach makes the overall surface of the |
Yamakaky
added this to the 1.0 milestone
Jul 25, 2017
This comment has been minimized.
This comment has been minimized.
|
But then if you want |
This comment has been minimized.
This comment has been minimized.
|
From a practical perspective yes. We can gate everything that needs an allocator on the |
This comment has been minimized.
This comment has been minimized.
|
I'm thinking more about Error, which I don't really see why it will be in alloc... |
This comment has been minimized.
This comment has been minimized.
|
From error.rs: https://github.com/rust-lang/rust/blob/master/src/libstd/error.rs#L45
Unfortunately |
This comment has been minimized.
This comment has been minimized.
|
OK then |
tarcieri commentedApr 3, 2017
It would be neat if this crate worked with
#![no_std]. The main thing it's using seems to beBox, which could usecollectionsin ano_stdcontext.If there's interest in gating the
stdstuff it uses on a cargo feature, I might be interested in submitting a PR.