Skip to content

Commit

Permalink
[FEAT]: additional functions exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Matejuk committed Feb 5, 2024
1 parent 99508b8 commit 48fa47c
Show file tree
Hide file tree
Showing 21 changed files with 252 additions and 70 deletions.
67 changes: 67 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[workspace]
resolver = "2"
resolver = "2"

members = [
"examples/simple"
]
members = [ "examples/simple" ]

[profile.release]
debug = true
debug = true
lto = false

[profile.dev]
opt-level = 1
lto = false
17 changes: 8 additions & 9 deletions examples/simple/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
[package]
name = "simple"
version = "0.1.0"
edition = "2021"
edition = "2021"
name = "simple"
version = "0.1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["staticlib"]

crate-type = [ "staticlib" ]


[dependencies]
anyhow = "1.0.71"
nginx_derive = { path = "../../nginx_derive" }
nginx_module = { path = "../../nginx_module" }
anyhow = "1.0.71"
nginx_derive = { path = "../../nginx_derive" }
nginx_module = { path = "../../nginx_module" }
2 changes: 1 addition & 1 deletion examples/simple/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

use std::ffi::{c_char, c_void};
Expand Down
32 changes: 18 additions & 14 deletions nginx_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
[package]
name = "nginx_derive"
version = "0.1.1"
edition = "2021"
authors = ["Gabriel Oprisan <gabriel.oprisan@gcore.com>"]
description = "Helper crate for nginx-rust"
homepage = "https://github.com/g-Core/nginx-rust"
repository = "https://github.com/g-Core/nginx-rust"
readme = "README.md"
license = "Apache-2.0"
authors = [ "Gabriel Oprisan <gabriel.oprisan@gcore.com>" ]
description = "Helper crate for nginx-rust"
edition = "2021"
homepage = "https://github.com/g-Core/nginx-rust"
license = "Apache-2.0"
name = "nginx_derive"
readme = "README.md"
repository = "https://github.com/g-Core/nginx-rust"
version = "0.1.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
proc-macro = true
proc-macro = true

[dependencies]
syn = "2.0.18"
quote = "1.0.28"
proc-macro2 = "1.0.59"
proc-macro2 = { version = "1.0.59" }
quote = { version = "1.0.28" }
syn = { version = "2.0.18" }

[profile.release]
debug = true
lto = false
2 changes: 1 addition & 1 deletion nginx_derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

use proc_macro::TokenStream;
Expand Down
31 changes: 16 additions & 15 deletions nginx_module/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[package]
name = "nginx_module"
version = "0.1.4"
edition = "2021"
build = "build.rs"
authors = ["Gabriel Oprisan <gabriel.oprisan@gcore.com>"]
description = "Rust bindings for building Nginx modules"
homepage = "https://github.com/g-Core/nginx-rust"
repository = "https://github.com/g-Core/nginx-rust"
readme = "README.md"
license = "Apache-2.0"
authors = [ "Gabriel Oprisan <gabriel.oprisan@gcore.com>" ]
build = "build.rs"
description = "Rust bindings for building Nginx modules"
edition = "2021"
homepage = "https://github.com/g-Core/nginx-rust"
license = "Apache-2.0"
name = "nginx_module"
readme = "README.md"
repository = "https://github.com/g-Core/nginx-rust"
version = "0.1.4"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
bindgen = "0.66.1"
bindgen = { version = "0.66.1" }

[dependencies]
anyhow = "1.0.71"
bitflags = "2.3.1"
libc = "0.2.144"
anyhow = { version = "1.0.71" }
bitflags = { version = "2.3.1" }
libc = { version = "0.2.144" }
url = { version = "2.5" }
2 changes: 1 addition & 1 deletion nginx_module/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

use bindgen::callbacks::{IntKind, ParseCallbacks};
Expand Down
2 changes: 1 addition & 1 deletion nginx_module/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

#![allow(non_upper_case_globals, non_snake_case, dead_code, non_camel_case_types, clippy::all)]
Expand Down
2 changes: 1 addition & 1 deletion nginx_module/src/complex_value.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

use std::{marker::PhantomData, mem::MaybeUninit};
Expand Down
2 changes: 1 addition & 1 deletion nginx_module/src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 G-Core Innovations SARL
* Copyright 2024 G-Core Innovations SARL
*/

use std::net::IpAddr;
Expand Down
Loading

0 comments on commit 48fa47c

Please sign in to comment.