whipsch / export_cstr

Provides a macro for exporting constant, null-terminated, C strings from dynamic libraries written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This crate is no longer useful.

See PR #18480


Example usage

Cargo.toml:

[lib]
name = "foo"
crate-type = ["dylib"]

[dependencies]
export_cstr = "*"

lib.rs:

#![feature(plugin)]
#[plugin] #[macro_use] extern crate export_cstr;

// implicit #[allow(dead_code, non_upper_case_globals)]
export_cstr!(foo, "this becomes an exported symbol 'foo' which points to a constant, null-terminated, C string");

// ...

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.

About

Provides a macro for exporting constant, null-terminated, C strings from dynamic libraries written in Rust.

License:Apache License 2.0


Languages

Language:Rust 100.0%