GithubHelp home page GithubHelp logo

erwanor / libevent-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jmagnuson/libevent-rs

0.0 0.0 0.0 188 KB

Rust bindings to the libevent async I/O framework.

License: Apache License 2.0

C 1.38% Rust 98.62%

libevent-rs's Introduction

libevent-rs

Released API docs

Rust bindings to the libevent async I/O framework.

Example

use libevent::{Base, Interval};

let mut base = Base::new();

let mut count: usize = 0;

let timer = Interval::new(Duration::from_secs(1));

base.spawn(timer, move |_event| {
    count += 1;
    println!("count: {}", count);
})?;

base.run();

System Requirements

  • libclang is required by bindgen which is used to generate the Rust bindings. See bindgen requirements for more information. Also ensure that LIBCLANG_PATH is set, as some systems do not do so by default. libclang is only required if buildtime_bindgen is enabled.

  • cmake if self-building via the bundled feature. The current bundled release is release-2.1.11-stable.

  • pkg-config if not self-building via the bundled feature.

  • buildtime_bindgen is an optional feature, enabled by default, which indicates that the Rust libevent bindings should be generated at build time.

  • LIBEVENT_SYS_BINDGEN_FILE is an environment variable indicating the path of the file containing the pregenerated Rust bindings which must be populated when buildtime_bindgen is not enabled, and it is only applicable in this case.

Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.57.0 and up. It might compile with older versions but that may change in any new patch release.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

libevent-rs's People

Contributors

jmagnuson avatar rushsteve1 avatar elbe0046 avatar aldaronlau avatar posborne avatar klebs6 avatar

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.