Giter Club home page Giter Club logo

Comments (5)

dpc avatar dpc commented on August 29, 2024

This is awesome.

from slog.

dpc avatar dpc commented on August 29, 2024

I have a basic fmt_streamer crate, but I can't decide whatever the logger (in-memory logger) gathered, should be accessed by the rest of the code. fmt_streamer owns some form of io-like datastructre (eg. circular buffer), and it's not obvious how to access it from outside of the drain-hierarchy.

If that logger would just dump it strait to UART, there's no problem. Otherwise some form of Rc<RefCel<..>> will be required?

from slog.

tupshin avatar tupshin commented on August 29, 2024

Is there an example of using the basic no_std support today?

I have

slog = {version = "1.4", default-features = false}
slog-term = "1.4"

in my Cargo.toml, and

#![no_std]

in my lib.rs

My own code is working fine, any the rest of slog seems ok, but the o! macro fails with

failed to resolve. Maybe a missing `extern crate std;`? (in expansion of `o!`) [E0433]: Maybe a missing `extern crate std;`?

I see that there are two versions of that macro, with the alternate being designed for no_std, but not sure what I'm doing wrong.
Thanks

from slog.

dpc avatar dpc commented on August 29, 2024

slog-term is the problem, I believe.

So this is how feature flags in cargo work: If you import any crate that imports slog crate that does not disable default flags, std feature will be implicitly reenabled.

slog-term requires libstd, as most slog crates do. slog crate tiself is known to compile and works without std, but the only current drain that would also work without libstd is https://github.com/slog-rs/fmtstream and it's not finished yet.

You can either help me finish fmtstream or write your own Drain (it's very easy).

from slog.

dpc avatar dpc commented on August 29, 2024

No help, no progress. Can be finished in the future.

from slog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.