-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. General transformation 3. Fix Cargo.toml
- Loading branch information
1 parent
53af08a
commit c0a9522
Showing
5 changed files
with
230 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
[package] | ||
name = "clucstr" | ||
version = "0.1.4" | ||
version = "0.1.6" | ||
authors = ["Денис Котляров <#Ulin Project 18, denis2005991@gmail.com>"] | ||
repository = "https://github.com/clucompany/cluCStr.git" | ||
|
||
license = "Apache-2.0" | ||
readme = "README.md" | ||
|
||
description = "Creation of CStr with zero cost. Plugin for rust compiler." | ||
keywords = ["cstr", "clucstr", "clucompany"] | ||
description = "Creation of strings C with zero cost. A plug-in for the rust compiler." | ||
keywords = ["cstr", "clucstr", "create_cstr", "clucompany"] | ||
categories = ["development-tools::ffi"] | ||
|
||
[features] | ||
|
||
[lib] | ||
name = "clucstr" | ||
crate-type = ["dylib", "rlib"] | ||
plugin = true | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
#![feature(plugin)] | ||
#![plugin(clucstr)] | ||
|
||
use std::ffi::CStr; | ||
|
||
fn main() { | ||
let c_str = cstr!(12u8); | ||
|
||
my_function(c_str); | ||
} | ||
|
||
fn my_function<A: AsRef<CStr>>(a: A) { | ||
println!("{:?}", a.as_ref()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.