commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
d5422c0fd772bc5914a613f41a389072ccd372d1 | Abhishek Chanda | 2016-02-12T08:55:11 | Revert "Use the ip crate"
This reverts commit 5f84d3a81739e5a48cf43c658dd5e1e70a03706c. | diff --git a/Cargo.toml b/Cargo.toml
index 25363f7..e299018 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.4.0"
+version = "0.5.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 2 | 3 | 7 |
af1cc62950036a944b10065c01fa9911f44a49b0 | Abhishek Chanda | 2016-02-01T06:40:31 | Uprev for crates.io | diff --git a/Cargo.toml b/Cargo.toml
index bea8a30..25363f7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.3.0"
+version = "0.4.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
6cae23f69cb0afd5fa9f8ac1037cd15417795ac3 | Abhishek Chanda | 2016-02-01T06:37:59 | Update clippy | diff --git a/Cargo.toml b/Cargo.toml
index 9b7c7d7..bea8a30 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,7 @@ license = "Apache-2.0"
repository = "https://github.com/achanda/ipnetwork"
[dependencies]
-clippy = {version = "0.0.21", optional = true}
+clippy = {version = "0.0.37", optional = true}
ip = "1.0.0"... | 1 | 1 | 1 |
42adf4ee93603b343649e4e2153493abcc502748 | Abhishek Chanda | 2016-02-01T06:35:36 | Add a broadcast function for IPv4 | diff --git a/src/lib.rs b/src/lib.rs
index 698dbd6..b685a35 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -56,6 +56,13 @@ impl Ipv4Network {
(Ipv4Addr::from(ip), ip)
}
+ pub fn broadcast(&self) -> (Ipv4Addr, u32) {
+ let (_, network) = self.network();
+ let (_, mask) = self.mask();
+ ... | 1 | 15 | 0 |
d84dc6161aa72de8552e4a13872a9221e9537a8c | Abhishek Chanda | 2016-02-01T06:29:41 | Fix the network function and associated tests | diff --git a/src/lib.rs b/src/lib.rs
index b2e084a..698dbd6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -51,7 +51,9 @@ impl Ipv4Network {
}
pub fn network(&self) -> (Ipv4Addr, u32) {
- (self.addr, u32::from(self.addr))
+ let (_, mask) = self.mask();
+ let ip = u32::from(self.addr) & mas... | 1 | 6 | 4 |
eaa36f4b0b849ff4f302c157431721aaec7e2fac | Abhishek Chanda | 2016-02-01T06:05:23 | Return an instance from the `ip` method | diff --git a/src/lib.rs b/src/lib.rs
index 5bcf61e..b2e084a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -36,8 +36,8 @@ impl Ipv4Network {
}
}
- pub fn ip(&self) -> &Ipv4Addr {
- &(self.addr)
+ pub fn ip(&self) -> Ipv4Addr {
+ self.addr
}
pub fn prefix(&self) -> u8 {
@@ -6... | 1 | 6 | 6 |
5f84d3a81739e5a48cf43c658dd5e1e70a03706c | Abhishek Chanda | 2016-01-09T12:32:19 | Use the ip crate | diff --git a/Cargo.toml b/Cargo.toml
index 890bb47..9b7c7d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.2.2"
+version = "0.3.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 2 | 7 | 3 |
af84388f005673d34bba30bdb073fa34300464af | Abhishek Chanda | 2015-12-26T18:59:08 | Run rustfmt | diff --git a/src/lib.rs b/src/lib.rs
index 003279f..004cc93 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -27,7 +27,10 @@ pub struct Ipv6Network {
impl Ipv4Network {
pub fn new(addr: Ipv4Addr, prefix: u8) -> Ipv4Network {
- Ipv4Network { addr: addr, prefix: prefix }
+ Ipv4Network {
+ addr... | 1 | 9 | 3 |
f8f2d7a4995c77f08422b779fe9c1f930b26768f | Abhishek Chanda | 2015-10-25T20:46:31 | Some cleanups as reported by clippy | diff --git a/src/lib.rs b/src/lib.rs
index 6b75570..003279f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -41,16 +41,16 @@ impl Ipv4Network {
pub fn mask(&self) -> (Ipv4Addr, u32) {
let prefix = self.prefix;
let mask = !(0xffffffff >> prefix);
- return (Ipv4Addr::from(mask), mask);
+ ... | 1 | 3 | 3 |
a3d9aa30264f9b4b5c1b6da603e698e7da47c112 | Abhishek Chanda | 2015-10-25T20:43:52 | Use clippy | diff --git a/Cargo.toml b/Cargo.toml
index f7b07a4..890bb47 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,3 +5,10 @@ authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
license = "Apache-2.0"
repository = "https://github.com/achanda/ipnetwork"... | 2 | 10 | 0 |
7b5a3c056bb46aec36487f1c53a2e217b8d311e5 | Abhishek Chanda | 2015-08-12T07:22:18 | Version bump | diff --git a/Cargo.toml b/Cargo.toml
index a8c897c..f7b07a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.2.1"
+version = "0.2.2"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
b47592b833aee3176c010a7511d09a77fb214163 | Abhishek Chanda | 2015-08-12T00:20:57 | Remove redundant function | diff --git a/src/lib.rs b/src/lib.rs
index 31bc719..b3fdba0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -35,11 +35,6 @@ impl Ipv4Network {
self.prefix
}
- pub fn mask_int(&self) -> u32 {
- let prefix = self.prefix;
- !(0xffffffff >> prefix)
- }
-
pub fn mask(&self) -> (Ipv4Addr,... | 1 | 0 | 5 |
c79edaf11ca4170fdbc1810c3119010d985d1704 | Abhishek Chanda | 2015-08-12T00:03:35 | Version bump | diff --git a/Cargo.toml b/Cargo.toml
index 094ee0e..a8c897c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.2.0"
+version = "0.2.1"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
26f9d1df5591fa457b8bc765381c6b49b131a95e | Abhishek Chanda | 2015-08-12T00:03:08 | Remove the unnecessary parentheses | diff --git a/src/lib.rs b/src/lib.rs
index 0c0ac39..31bc719 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -52,7 +52,7 @@ impl Ipv4Network {
pub fn contains(&self, ip: Ipv4Addr) -> bool {
let (_, net) = self.network();
- return ((u32::from(ip) & net) == net)
+ return (u32::from(ip) & net) == ... | 1 | 1 | 1 |
e1d412efc40349779695c56fe5770492ed9d0534 | Abhishek Chanda | 2015-08-12T00:02:15 | Version bump | diff --git a/Cargo.toml b/Cargo.toml
index 9c1720c..094ee0e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.11"
+version = "0.2.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licen... | 1 | 1 | 1 |
1b74cfda59db02ccbe7d3ec78b2864e190c8bce5 | Abhishek Chanda | 2015-08-12T00:00:45 | Implement a contains() method
This returns true if a given IP belongs to a subnet | diff --git a/src/lib.rs b/src/lib.rs
index 65bff80..0c0ac39 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -49,6 +49,11 @@ impl Ipv4Network {
pub fn network(&self) -> (Ipv4Addr, u32) {
return (self.addr, u32::from(self.addr));
}
+
+ pub fn contains(&self, ip: Ipv4Addr) -> bool {
+ let (_, net)... | 1 | 12 | 0 |
f99c458597f8b97b866b66e88d8c913451ce23fa | chanda, abhishek | 2015-08-03T01:34:01 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index 5d6b903..9c1720c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.10"
+version = "0.1.11"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
lice... | 1 | 1 | 1 |
9bffd5c5ece37aa621c5c7f87ead636a95885078 | chanda, abhishek | 2015-08-03T01:27:17 | Simplify API | diff --git a/src/lib.rs b/src/lib.rs
index 1dc6843..65bff80 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -40,17 +40,14 @@ impl Ipv4Network {
!(0xffffffff >> prefix)
}
- pub fn mask(&self) -> Ipv4Addr {
- let mask = self.mask_int();
- Ipv4Addr::from(mask)
- }
-
- pub fn network_int(... | 1 | 12 | 23 |
b7f691533a140725130f58c7b05370d60cfbd01a | Abhishek Chanda | 2015-05-22T07:28:40 | Simplify network* functions | diff --git a/src/lib.rs b/src/lib.rs
index 37fc4a0..1dc6843 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -46,11 +46,11 @@ impl Ipv4Network {
}
pub fn network_int(&self) -> u32 {
- u32::from(*(self.ip())) & self.mask_int()
+ u32::from(self.addr)
}
pub fn network(&self) -> Ipv4Addr {
... | 1 | 2 | 2 |
d3a4bf5b7783af1743b6a1d150b9607b805ff947 | Abhishek Chanda | 2015-05-05T19:26:56 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index 3f68309..5d6b903 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.9"
+version = "0.1.10"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licen... | 1 | 1 | 1 |
3354f6c7259a6fb7fbf21cbb8db5a7d607c4ce63 | Abhishek Chanda | 2015-05-05T19:26:16 | Also get rid of more unnecessary method | diff --git a/src/lib.rs b/src/lib.rs
index d32ff07..37fc4a0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -46,17 +46,12 @@ impl Ipv4Network {
}
pub fn network_int(&self) -> u32 {
- Ipv4Network::ip_to_int(*(self.ip())) & self.mask_int()
+ u32::from(*(self.ip())) & self.mask_int()
}
pu... | 1 | 1 | 6 |
bbf8cb0964fdd5ae2cc7588cbc85dcd51338621b | Abhishek Chanda | 2015-05-05T19:25:06 | Sync with nightly | diff --git a/src/lib.rs b/src/lib.rs
index 2170b58..d32ff07 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -42,7 +42,7 @@ impl Ipv4Network {
pub fn mask(&self) -> Ipv4Addr {
let mask = self.mask_int();
- Ipv4Network::int_to_ip(mask)
+ Ipv4Addr::from(mask)
}
pub fn network_int(&sel... | 1 | 2 | 7 |
aaf451db41a69a5d7a06006a3f1195ac2d92d2e4 | Abhishek Chanda | 2015-05-04T23:48:08 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index caedbf5..3f68309 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.8"
+version = "0.1.9"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
8af99ddc30f9556f782b56da39b428ec3538e511 | Abhishek Chanda | 2015-05-04T23:47:47 | Consolidate | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
deleted file mode 100644
index 727b4cd..0000000
--- a/src/ipnetwork.rs
+++ /dev/null
@@ -1,152 +0,0 @@
-use std::fmt;
-use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
-
-// A network
-#[derive(Debug)]
-pub enum IpNetwork {
- V4(Ipv4Network),
- V6(Ipv6Network),
-}
-
-pu... | 2 | 152 | 154 |
d51eab196caa0ad58bb2df4c5099aa82e5eb3a1c | Abhishek Chanda | 2015-05-03T08:09:03 | Trying to make name resolution work | diff --git a/Cargo.toml b/Cargo.toml
index 9c26307..caedbf5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.7"
+version = "0.1.8"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 2 | 3 | 1 |
e3aeff7a0881afcd9d7ee40cbbc223392d31e5b4 | Abhishek Chanda | 2015-05-03T08:08:08 | Revert "Consolidate and update version"
This reverts commit 5dae4eb4e1dc36e21575619a639eb2ec488345f8. | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
new file mode 100644
index 0000000..727b4cd
--- /dev/null
+++ b/src/ipnetwork.rs
@@ -0,0 +1,152 @@
+use std::fmt;
+use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
+
+// A network
+#[derive(Debug)]
+pub enum IpNetwork {
+ V4(Ipv4Network),
+ V6(Ipv6Network),
+}
+
+pub st... | 2 | 153 | 153 |
f61382c5853bcf7ae5ae8fbe05ff13c84dd3533f | Abhishek Chanda | 2015-05-03T07:59:24 | Don't put an explicit crate name | diff --git a/Cargo.toml b/Cargo.toml
index a1e5731..9c26307 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.6"
+version = "0.1.7"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 2 | 1 | 2 |
5dae4eb4e1dc36e21575619a639eb2ec488345f8 | Abhishek Chanda | 2015-05-03T07:56:32 | Consolidate and update version | diff --git a/Cargo.toml b/Cargo.toml
index c48d74d..a1e5731 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.5"
+version = "0.1.6"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 3 | 154 | 154 |
48b98379bc6f2fdcaa3eec9f735a9184a00e0c15 | Abhishek Chanda | 2015-05-01T21:05:54 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index c491c09..c48d74d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.4"
+version = "0.1.5"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
53534046742acfe47effc45a04c075ebe6c32603 | Abhishek Chanda | 2015-05-01T21:05:26 | Make everything pub | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
index 9bea1a4..727b4cd 100644
--- a/src/ipnetwork.rs
+++ b/src/ipnetwork.rs
@@ -19,33 +19,33 @@ pub struct Ipv6Network {
}
impl Ipv4Network {
- fn new(addr: Ipv4Addr, prefix: u8) -> Ipv4Network {
+ pub fn new(addr: Ipv4Addr, prefix: u8) -> Ipv4Network {
... | 1 | 10 | 10 |
502b3bda7e47c91c7d29e187313b1179fefb5905 | Abhishek Chanda | 2015-05-01T20:44:19 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index fcaf494..c491c09 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.3"
+version = "0.1.4"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
2cb9f22e96bae5210b7bbeffbc447a32ead07e76 | Abhishek Chanda | 2015-05-01T20:42:49 | Allow dead code in a lib | diff --git a/src/lib.rs b/src/lib.rs
index 77278fa..7f8dca8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,5 @@
#![crate_type = "lib"]
#![crate_name = "ipnetwork"]
#![feature(ip_addr)]
+#[allow(dead_code)]
pub mod ipnetwork; | 1 | 1 | 0 |
de56047657db7c901afafefc55ab2a852ffcbfe9 | Abhishek Chanda | 2015-05-01T20:41:24 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index df852e5..fcaf494 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.2"
+version = "0.1.3"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
75edb5d7832fc763bc6329b516c2ee9d8aa1dec9 | Abhishek Chanda | 2015-05-01T20:40:53 | Add some crate attributes | diff --git a/src/lib.rs b/src/lib.rs
index 67a4b4a..77278fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,2 +1,4 @@
+#![crate_type = "lib"]
+#![crate_name = "ipnetwork"]
#![feature(ip_addr)]
pub mod ipnetwork; | 1 | 2 | 0 |
92edb82c705a5990ee60e130b54980f21f435b2e | Abhishek Chanda | 2015-04-26T07:27:43 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index 8c7ca85..df852e5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
d6ab8ef58c73457f80aeadb6a785c2fadba7b1dd | Abhishek Chanda | 2015-04-26T07:25:30 | Enforce a naming convention
method names without a suffix returns values in a human readable
form, wrapped in a Ipv4Addr. With a suffix returns values in a
machine readable form. | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
index 9c5e573..9bea1a4 100644
--- a/src/ipnetwork.rs
+++ b/src/ipnetwork.rs
@@ -31,18 +31,18 @@ impl Ipv4Network {
self.prefix
}
- fn mask(&self) -> u32 {
+ fn mask_int(&self) -> u32 {
let prefix = self.prefix;
!(0xffffffff >> pref... | 1 | 9 | 9 |
84d173d46fb56969aeaaeaead7232d09af094862 | Abhishek Chanda | 2015-04-26T07:10:49 | Add a method to get network as an IPv4 address | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
index d7bdc72..9c5e573 100644
--- a/src/ipnetwork.rs
+++ b/src/ipnetwork.rs
@@ -45,6 +45,10 @@ impl Ipv4Network {
Ipv4Network::ip_to_int(*(self.ip())) & self.mask()
}
+ fn network(&self) -> Ipv4Addr {
+ Ipv4Network::int_to_ip(self.network_int())... | 1 | 11 | 1 |
3984451d93aa6f8c185bb60fe76018ebad62aa6d | Abhishek Chanda | 2015-04-26T07:02:03 | Add a method to get network address as an int
Also fix a bug with IP to int conversion | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
index 58e500d..d7bdc72 100644
--- a/src/ipnetwork.rs
+++ b/src/ipnetwork.rs
@@ -41,9 +41,13 @@ impl Ipv4Network {
Ipv4Network::int_to_ip(mask).to_string()
}
+ fn network_int(&self) -> u32 {
+ Ipv4Network::ip_to_int(*(self.ip())) & self.mask()
+ ... | 1 | 11 | 1 |
b8a59d2b7313955dc358fcaa6ff9b8e7d4475104 | Abhishek Chanda | 2015-04-24T07:54:59 | Move around some stuff | diff --git a/src/ipnetwork.rs b/src/ipnetwork.rs
new file mode 100644
index 0000000..58e500d
--- /dev/null
+++ b/src/ipnetwork.rs
@@ -0,0 +1,132 @@
+use std::fmt;
+use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
+
+// A network
+#[derive(Debug)]
+pub enum IpNetwork {
+ V4(Ipv4Network),
+ V6(Ipv6Network),
+}
+
+pub st... | 2 | 133 | 133 |
5aaf6abcb892773fd9d68cd9f0e4bc9ecaf8e548 | Abhishek Chanda | 2015-04-24T07:22:16 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index d4b86e1..8c7ca85 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ipnetwork"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
licens... | 1 | 1 | 1 |
7226c3fb6f6c0f2168cc1189eeed9c1533a946df | Abhishek Chanda | 2015-04-24T07:21:23 | Some more metadata | diff --git a/Cargo.toml b/Cargo.toml
index 0fee944..d4b86e1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,3 +4,4 @@ version = "0.1.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
description = "A library to work with IP CIDRs in Rust, heavily WIP"
license = "Apache-2.0"
+repository = "https://github.com/... | 1 | 1 | 0 |
6abb65e3665f881efd6c687d5d9647e1ddc008e0 | Abhishek Chanda | 2015-04-24T07:19:47 | Update crate name and add some metadata | diff --git a/Cargo.toml b/Cargo.toml
index b3ae2fe..0fee944 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,4 +1,6 @@
[package]
-name = "network"
+name = "ipnetwork"
version = "0.1.0"
authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"]
+description = "A library to work with IP CIDRs in Rust, heavily WIP"
+license... | 1 | 3 | 1 |
eed25247b56b94e8536b4156dd11d6d456dd6c73 | Abhishek Chanda | 2015-04-24T07:10:08 | Make ip_to_int a static method | diff --git a/src/lib.rs b/src/lib.rs
index bbe7b33..65a0705 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,7 +43,7 @@ impl Ipv4Network {
Ipv4Network::int_to_ip(mask).to_string()
}
- fn ip_to_int(&self, addr: Ipv4Addr) -> u32 {
+ fn ip_to_int(addr: Ipv4Addr) -> u32 {
let ip = addr.octets(... | 1 | 1 | 1 |
450d98348a7a6aeba07a5259edaee6ac939c735e | Abhishek Chanda | 2015-04-24T07:08:32 | Add some more methods for v4
- Methods to get mask as int and as string
- Associated tests | diff --git a/src/lib.rs b/src/lib.rs
index ddde2fd..bbe7b33 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -32,6 +32,26 @@ impl Ipv4Network {
fn prefix(&self) -> u8 {
self.prefix
}
+
+ fn mask(&self) -> u32 {
+ let prefix = self.prefix;
+ !(0xffffffff >> prefix)
+ }
+
+ fn mask_to... | 1 | 33 | 1 |
72797bb080993d7819e4c1a309c9c3b26aca18cc | Abhishek Chanda | 2015-04-23T20:31:12 | Rename tests | diff --git a/src/lib.rs b/src/lib.rs
index 248b89e..ddde2fd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -89,13 +89,13 @@ mod test {
use super::*;
#[test]
- fn test_create_v4() {
+ fn create_v4() {
let cidr = Ipv4Network::new(Ipv4Addr::new(77, 88, 21, 11), 24);
assert_eq!(cidr.prefix(... | 1 | 2 | 2 |
c8f81d9199a1986c4593031ba948eba4f77e48db | Abhishek Chanda | 2015-04-18T02:51:12 | Add a test for IP v6 | diff --git a/src/lib.rs b/src/lib.rs
index 23b6c0d..248b89e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -85,7 +85,7 @@ impl fmt::Debug for Ipv6Network {
#[cfg(test)]
mod test {
- use std::net::Ipv4Addr;
+ use std::net::{Ipv4Addr, Ipv6Addr};
use super::*;
#[test]
@@ -93,4 +93,10 @@ mod test {
... | 1 | 7 | 1 |
c74528309cba3d62e70f4f2858b37da66d017de7 | Abhishek Chanda | 2015-04-18T01:34:35 | Update address | diff --git a/Cargo.toml b/Cargo.toml
index 35b07ed..b3ae2fe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,4 +1,4 @@
[package]
name = "network"
version = "0.1.0"
-authors = ["Abhishek Chanda <abhishek@cloudscaling.com>"]
+authors = ["Abhishek Chanda <abhishe.becsk@gmail.com>"] | 1 | 1 | 1 |
07b1e49dc27b651b0ce7c1fc9dd796f5ac3c70da | Abhishek Chanda | 2015-04-18T01:20:50 | Get a basic thing working | diff --git a/src/lib.rs b/src/lib.rs
index a93251b..23b6c0d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,96 @@
-#[test]
-fn it_works() {
+#![feature(ip_addr)]
+
+use std::fmt;
+use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
+
+// A network
+#[derive(Debug)]
+pub enum IpNetwork {
+ V4(Ipv4Network),
+ V6(Ipv6Ne... | 1 | 95 | 2 |
e68c86343ecf804a16909852f7de8d26b7d4e122 | Abhishek Chanda | 2015-04-17T20:47:31 | Adding directory structure | diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..35b07ed
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,4 @@
+[package]
+name = "network"
+version = "0.1.0"
+authors = ["Abhishek Chanda <abhishek@cloudscaling.com>"]
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..a93251b
--- ... | 2 | 7 | 0 |
106e316c4590e77a14dabbd27e5b0d8a58e78285 | Pruthvikar Reddy | 2025-08-01T01:03:31 | added support for watchos | diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs
index 96460d0..7531ee5 100644
--- a/src/detail/aarch64_unix.rs
+++ b/src/detail/aarch64_unix.rs
@@ -8,6 +8,8 @@ cfg_if::cfg_if! {
std::arch::global_asm!(include_str!("asm/asm_aarch64_aapcs_macho.S"));
} else if #[cfg(target_os = "tvos")]... | 2 | 4 | 0 |
e0f70510451f05f6136b067d5a581ca429abaa30 | Pruthvikar Reddy | 2025-07-31T23:26:22 | support tvos | diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs
index 0e333f1..96460d0 100644
--- a/src/detail/aarch64_unix.rs
+++ b/src/detail/aarch64_unix.rs
@@ -6,6 +6,8 @@ cfg_if::cfg_if! {
std::arch::global_asm!(include_str!("asm/asm_aarch64_aapcs_macho.S"));
} else if #[cfg(target_os = "ios")] ... | 2 | 4 | 0 |
b47adee8374c3bcd771a58e1d96b43e6822c8742 | Xudong-Huang | 2025-12-17T03:25:50 | :pencil: bump version to 0.8.8 | diff --git a/Cargo.toml b/Cargo.toml
index 86edf38..d9b8409 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.7"
+version = "0.8.8"
edition = "2021"
rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"] | 1 | 1 | 1 |
155d78af05172b960054748b50e99e8691c07e23 | Xudong-Huang | 2025-12-17T03:09:33 | :pencil: update windows-bindgen to 0.65 | diff --git a/api_gen/Cargo.toml b/api_gen/Cargo.toml
index 8313888..a002333 100644
--- a/api_gen/Cargo.toml
+++ b/api_gen/Cargo.toml
@@ -5,4 +5,4 @@ edition = "2021"
publish = false
[dependencies]
-windows-bindgen = "0.64"
+windows-bindgen = "0.65"
diff --git a/src/stack/windows_bindings.rs b/src/stack/windows_bind... | 2 | 2 | 2 |
bda6ccc58c15b1abc5a2aec5fb119d9eaee33448 | Xudong-Huang | 2025-12-17T02:43:55 | :pencil: fix clippy warnings | diff --git a/src/stack/overflow_unix.rs b/src/stack/overflow_unix.rs
index 787cfc7..662eca2 100644
--- a/src/stack/overflow_unix.rs
+++ b/src/stack/overflow_unix.rs
@@ -70,7 +70,7 @@ unsafe fn init() {
let mut action: sigaction = mem::zeroed();
action.sa_flags = SA_SIGINFO | SA_ONSTACK;
- action.sa_sigac... | 1 | 1 | 1 |
c6b06df315e561081cdd56d662bdd4c18af69a1d | Xudong-Huang | 2025-12-17T02:40:05 | :pencil: fix more plateform clippy warnings | diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs
index 3e3d274..0e333f1 100644
--- a/src/detail/aarch64_unix.rs
+++ b/src/detail/aarch64_unix.rs
@@ -77,7 +77,7 @@ pub fn initialize_call_frame(
// Aarch64 current stack frame pointer
regs.gpr[FP] = sp as usize;
- regs.gpr[LR] = bootstra... | 6 | 7 | 7 |
99801829eb8069467c476f4b0ed9615dfde0f526 | Xudong-Huang | 2025-12-17T02:36:40 | :pencil: fix clippy warnings | diff --git a/src/detail/x86_64_windows.rs b/src/detail/x86_64_windows.rs
index 73df8c5..5eafe09 100644
--- a/src/detail/x86_64_windows.rs
+++ b/src/detail/x86_64_windows.rs
@@ -233,7 +233,7 @@ pub fn initialize_call_frame(
unsafe {
// leave enough space for RET
- *mut_offset(sp, -2) = bootstrap_g... | 2 | 39 | 20 |
f6ffdeb31de37f3caa8303b0c39991bbd9457a89 | casibbald | 2025-12-05T14:32:29 | fix: robust thread-local access for Rust 1.90+ on macOS/Windows
- Add #[inline(never)] on release macOS/Windows to prevent problematic inlining
- Use compiler_fence with SeqCst ordering before and after TLS access
- Use std::hint::black_box to prevent optimization of TLS values
- Apply protection to current(), co_ctx(... | diff --git a/src/rt.rs b/src/rt.rs
index cfdb956..d82781f 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -6,6 +6,7 @@ use std::any::Any;
use std::cell::Cell;
use std::mem::MaybeUninit;
use std::ptr;
+use std::sync::atomic::{compiler_fence, Ordering};
use crate::reg_context::RegContext;
@@ -173,22 +174,45 @@ impl Con... | 1 | 67 | 18 |
6201b45c99b2f41d133e4c5ca1803885d61be732 | Xudong-Huang | 2025-09-11T03:35:22 | :pencil: cargo fmt | diff --git a/src/stack/windows.rs b/src/stack/windows.rs
index fa16b8f..f4e8a99 100644
--- a/src/stack/windows.rs
+++ b/src/stack/windows.rs
@@ -14,12 +14,7 @@ use super::SysStack;
pub mod overflow;
pub unsafe fn allocate_stack(size: usize) -> io::Result<SysStack> {
- let ptr = VirtualAlloc(
- ptr::null()... | 1 | 1 | 6 |
cd7c99da574a3977e2a7e1c649f4c25a13ef0ccd | Marijn Suijten | 2025-09-09T19:20:05 | Embrace `GetLastError()` behaviour from the `windows` crate | diff --git a/src/stack/windows.rs b/src/stack/windows.rs
index e2f1f4d..a7973d8 100644
--- a/src/stack/windows.rs
+++ b/src/stack/windows.rs
@@ -43,8 +43,8 @@ pub unsafe fn protect_stack(stack: &SysStack) -> io::Result<SysStack> {
&mut old_prot,
);
- if ret.is_err() {
- Err(io::Error::last_os_... | 1 | 2 | 2 |
e47c65c7f0dc287386ea2389884bf9c514048368 | Marijn Suijten | 2025-09-09T18:22:12 | Bump `windows` crate range to `0.58-0.62`
https://github.com/microsoft/windows-rs/releases/tag/69 | diff --git a/Cargo.toml b/Cargo.toml
index fdf1ffb..c19c173 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ build = "build.rs"
[target.'cfg(windows)'.dependencies.windows]
-version = ">=0.58, <=0.61"
+version = ">=0.58, <=0.62"
features = [
"Win32_System_Memory",
"Win32_System_Kernel", | 1 | 1 | 1 |
b74452c8560f8ace18e892c35973c5ea33ab0de2 | Xudong Huang | 2025-09-10T02:24:22 | :pencil: fix rust 1.91.0-nightly warnings | diff --git a/src/reg_context.rs b/src/reg_context.rs
index 51dd4c6..579562c 100644
--- a/src/reg_context.rs
+++ b/src/reg_context.rs
@@ -70,7 +70,7 @@ mod test {
let func: fn() = unsafe { transmute(f) };
func();
- let ctx: &RegContext = unsafe { transmute(arg) };
+ let ctx: &RegContext... | 2 | 2 | 2 |
672adfa1272eedf9beb63e3c38c61d17445ac494 | Xudong-Huang | 2025-08-21T08:29:24 | :pencil: yank 0.8.6 and bump version to 0.8.7 | diff --git a/Cargo.toml b/Cargo.toml
index 6d22ba5..fdf1ffb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.6"
+version = "0.8.7"
edition = "2021"
rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
diff --git a/src/rt.rs b/src/rt.rs
index... | 2 | 2 | 2 |
9d7fc54986fa99a6df7d0f9dda56c2c80b7f2582 | Xudong-Huang | 2025-08-21T08:20:47 | :pencil: bump version to 0.8.6 | diff --git a/Cargo.toml b/Cargo.toml
index 8b308b5..6d22ba5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.5"
+version = "0.8.6"
edition = "2021"
rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
diff --git a/src/rt.rs b/src/rt.rs
index... | 2 | 5 | 4 |
deb8f5e76da07579028fc4378e23da3b297eff58 | Xudong-Huang | 2025-08-21T08:08:58 | :bug: try to fix macos issue | diff --git a/src/rt.rs b/src/rt.rs
index 125954d..4baa7f1 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -183,7 +183,7 @@ impl ContextStack {
// for windows release seems add these two lines fix the bug!
// the MAY project test could fail due to this bug
// this bug is appeared since rust 1.89
- ... | 1 | 1 | 1 |
b9b782ae52b6f34d1366da3053dbe10ae0129774 | Xudong-Huang | 2025-08-21T07:57:35 | :pencil: fix may test failure | diff --git a/src/rt.rs b/src/rt.rs
index af2c066..125954d 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -179,6 +179,16 @@ impl ContextStack {
if root.is_null() {
root = Self::init_root();
}
+
+ // for windows release seems add these two lines fix the bug!
+ // the MAY project te... | 1 | 10 | 0 |
e187a0787f17fb804ae72bb92cd150e0a7d9f26b | Xudong-Huang | 2025-08-21T05:46:44 | :pencil: refine co_ctx | diff --git a/src/rt.rs b/src/rt.rs
index 2de224b..af2c066 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -166,12 +166,8 @@ pub struct ContextStack {
impl ContextStack {
#[cold]
fn init_root() -> *mut Context {
- let root = {
- let mut root = Box::new(Context::new());
- let p = &mut *r... | 1 | 10 | 24 |
6b9e1e2a86c70642e5247447c2ea5517e6210504 | Marijn Suijten | 2025-01-08T11:15:38 | Bump `windows` crate range to `0.58-0.61`
Because there were no breaking changes that affect this crate, the
range could simply be extended to allow the new `windows 0.59` release
in addition to `windows 0.58`, allowing our MSRV to stay unmodified
(`windows 0.59` would have bumped it to `1.74` otherwise). However,
su... | diff --git a/Cargo.toml b/Cargo.toml
index 0051f44..8b308b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ build = "build.rs"
[target.'cfg(windows)'.dependencies.windows]
-version = "0.58"
+version = ">=0.58, <=0.61"
features = [
"Win32_System_Memory",
"Win32_System_Kernel", | 1 | 1 | 1 |
bc723bc9f438eef5e7934c756ca2111c34e52aa9 | Marijn Suijten | 2025-07-02T08:29:02 | Revert ":pencil: update windows to version 0.60"
This reverts commit 250f96ae7ba5e916ed2a83d3c216568f5f810e24. | diff --git a/Cargo.toml b/Cargo.toml
index 0cea1c2..0051f44 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ build = "build.rs"
[target.'cfg(windows)'.dependencies.windows]
-version = "0.61"
+version = "0.58"
features = [
"Win32_System_Memory",
"Win32_System_Kernel",
@@ -47,4 +47,4 @@ cc = "1.... | 1 | 2 | 2 |
70f0a66e321560fb4c14c2b949838c6edda8f4b8 | Xudong Huang | 2025-05-13T09:26:47 | :pencil: bump version to 0.8.5 | diff --git a/Cargo.toml b/Cargo.toml
index ceeda74..0cea1c2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.4"
+version = "0.8.5"
edition = "2021"
rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"] | 1 | 1 | 1 |
643c7138fee58deac2a298c25b57a4f621d451da | Xudong Huang | 2025-05-13T08:41:12 | :pencil: fix cargo clippy | diff --git a/Cargo.toml b/Cargo.toml
index 1fae04f..ceeda74 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ build = "build.rs"
[target.'cfg(windows)'.dependencies.windows]
-version = "0.60"
+version = "0.61"
features = [
"Win32_System_Memory",
"Win32_System_Kernel",
diff --git a/build.rs b/bu... | 2 | 1 | 2 |
c22827709329dd2cc7ebe15a92cba809c3ada69e | Markus Mielimonka | 2025-05-07T10:08:34 | fix(powerpc64le): removed changes from debugging :) | diff --git a/src/stack/overflow_unix.rs b/src/stack/overflow_unix.rs
index 87d4152..787cfc7 100644
--- a/src/stack/overflow_unix.rs
+++ b/src/stack/overflow_unix.rs
@@ -28,6 +28,7 @@ static SIG_ACTION: Mutex<MaybeUninit<sigaction>> = Mutex::new(MaybeUninit::unini
// context is usually compatible with libc::ucontext_t.... | 1 | 1 | 0 |
1d308db41044eafb9ed60700dfe38c3df1643439 | Markus Mielimonka | 2025-05-07T10:08:34 | fix(powerpc64le): removed changes from debugging :) | diff --git a/src/reg_context.rs b/src/reg_context.rs
index 2ec17f5..51dd4c6 100644
--- a/src/reg_context.rs
+++ b/src/reg_context.rs
@@ -21,8 +21,7 @@ impl RegContext {
/// Create a new context, only used in tests
#[cfg(test)]
- // todo: change back to non-pub
- pub fn new(init: InitFn, arg: usize, st... | 1 | 2 | 4 |
af6a1f4c0d97e8f22913474e9d4034d029f26537 | Xudong Huang | 2025-03-25T01:35:24 | :pencil: fix cargo clippy warnings | diff --git a/src/rt.rs b/src/rt.rs
index 4323c2d..2de224b 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -72,7 +72,7 @@ impl Context {
/// judge it's generator context
#[inline]
pub fn is_generator(&self) -> bool {
- self.parent != self as *const _ as *mut _
+ !std::ptr::eq(self.parent, self)
... | 2 | 4 | 4 |
250f96ae7ba5e916ed2a83d3c216568f5f810e24 | Xudong-Huang | 2025-02-25T05:30:56 | :pencil: update windows to version 0.60 | diff --git a/Cargo.toml b/Cargo.toml
index 2d219ca..590c2d5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,7 +21,7 @@ exclude = [
[target.'cfg(windows)'.dependencies.windows]
-version = "0.58"
+version = "0.60"
features = [
"Win32_System_Memory",
"Win32_System_Kernel", | 1 | 1 | 1 |
798c05211d656bdfb9bf77bfbd4554881b48eb84 | Xudong Huang | 2024-12-26T09:16:06 | :pencil: make root init as cold | diff --git a/src/rt.rs b/src/rt.rs
index 9b9161a..4323c2d 100644
--- a/src/rt.rs
+++ b/src/rt.rs
@@ -164,16 +164,24 @@ pub struct ContextStack {
}
impl ContextStack {
+ #[cold]
+ fn init_root() -> *mut Context {
+ let root = {
+ let mut root = Box::new(Context::new());
+ let p = &... | 1 | 15 | 7 |
1ff490db5965207e51f9330d8ad7b0442424ad4f | Xudong-Huang | 2024-12-05T04:44:22 | :pencil: bump version to 0.8.4 | diff --git a/Cargo.toml b/Cargo.toml
index 04f8354..2d219ca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.3"
+version = "0.8.4"
edition = "2021"
rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"] | 1 | 1 | 1 |
177935c1ef48a8743a622e9e42e7ceed5df4c846 | Xudong Huang | 2024-10-08T14:38:25 | :pencil: fix unix sigaction clippy warning | diff --git a/src/stack/overflow_unix.rs b/src/stack/overflow_unix.rs
index 5684a77..0ea8a05 100644
--- a/src/stack/overflow_unix.rs
+++ b/src/stack/overflow_unix.rs
@@ -5,9 +5,9 @@ use libc::{sigaction, sighandler_t, SA_ONSTACK, SA_SIGINFO, SIGBUS, SIGSEGV};
use std::mem;
use std::mem::MaybeUninit;
use std::ptr::nul... | 1 | 7 | 4 |
d0241b6436b6b19eb6aaa8c9a77dcdaee65eda7b | Xudong Huang | 2024-10-07T12:28:04 | :pencil: fix cargo clippy | diff --git a/src/gen_impl.rs b/src/gen_impl.rs
index 5c291bc..a0c27db 100644
--- a/src/gen_impl.rs
+++ b/src/gen_impl.rs
@@ -173,14 +173,14 @@ impl<'a, A, T, const LOCAL: bool> GeneratorObj<'a, A, T, LOCAL> {
}
}
-impl<'a, T, const LOCAL: bool> Iterator for GeneratorObj<'a, (), T, LOCAL> {
+impl<T, const LOCAL:... | 3 | 7 | 7 |
a0d202ae5b3ebb7e9f5f79ad5ce832d1d5fb8455 | Taiki Endo | 2024-09-15T13:42:17 | Fix build error with MSRV and relax MSRV to 1.73 | diff --git a/Cargo.toml b/Cargo.toml
index 61b786f..04f8354 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
name = "generator"
version = "0.8.3"
edition = "2021"
-rust-version = "1.77"
+rust-version = "1.73"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0"
repository = "http... | 2 | 3 | 3 |
4ce0042fc94c9a43d1bbff54c8baf8ad91cf9c5b | Xudong Huang | 2024-09-04T05:20:06 | :pencil: some optimize | diff --git a/src/gen_impl.rs b/src/gen_impl.rs
index 001aa43..5c291bc 100644
--- a/src/gen_impl.rs
+++ b/src/gen_impl.rs
@@ -30,7 +30,7 @@ fn cold() {}
// }
#[inline]
-fn unlikely(b: bool) -> bool {
+pub(crate) fn unlikely(b: bool) -> bool {
if b {
cold()
}
diff --git a/src/rt.rs b/src/rt.rs
inde... | 3 | 8 | 7 |
71588aa55721e1d9cec1fe2b28ca4b109381dd23 | Xudong Huang | 2024-09-01T10:27:43 | :pencil: support aarch64 ios target (#64) | diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs
index 8eea0c1..3e3d274 100644
--- a/src/detail/aarch64_unix.rs
+++ b/src/detail/aarch64_unix.rs
@@ -4,6 +4,8 @@ use crate::stack::Stack;
cfg_if::cfg_if! {
if #[cfg(target_os = "macos")] {
std::arch::global_asm!(include_str!("asm/asm_aar... | 2 | 2 | 4 |
9ee36513f5be9e9e06c2288265c5089a601a18d2 | Xudong Huang | 2024-09-01T05:11:25 | :pencil: bump version to 0.8.3 | diff --git a/Cargo.toml b/Cargo.toml
index 9a9dbce..61b786f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
rust-version = "1.77"
authors = ["Xudong Huang <huangxu008@hotmail.com>"] | 1 | 1 | 1 |
969027c5a3310bc765cead05049b044cbfd4a676 | Xudong Huang | 2024-09-01T03:50:19 | :pencil: refine context root thread local | diff --git a/src/lib.rs b/src/lib.rs
index f724d5c..0b022f0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -3,7 +3,6 @@
//! Rust generator library
//!
-#![cfg_attr(nightly, feature(thread_local))]
#![deny(warnings, missing_docs)]
#![allow(deprecated)]
diff --git a/src/rt.rs b/src/rt.rs
index d4bab7d..990aff7 10064... | 2 | 18 | 39 |
a2980810cc77183a28042ec6c7e2e4a535a28154 | Xudong-Huang | 2024-08-26T07:10:53 | :pencil: add msrv 1.77 (#61) | diff --git a/Cargo.toml b/Cargo.toml
index 1ad4dfd..9a9dbce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
name = "generator"
version = "0.8.2"
edition = "2021"
+rust-version = "1.77"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0"
repository = "https://github.com/Xudong-H... | 1 | 1 | 0 |
f848c650813ab19cb4a029ae4a782eaab950cf61 | Ilya Sorochan | 2024-08-23T16:03:38 | Add init_fn definition for loongarch64 | diff --git a/src/reg_context.rs b/src/reg_context.rs
index 3bea144..c9504dd 100644
--- a/src/reg_context.rs
+++ b/src/reg_context.rs
@@ -86,6 +86,11 @@ mod test {
init_fn_impl(arg, f)
}
+ #[cfg(target_arch = "loongarch64")]
+ extern "C" fn init_fn(arg: usize, f: *mut usize) -> ! {
+ init_fn... | 1 | 5 | 0 |
0141c88ee2c8edddc9d0ecf434b1352932afc103 | Ilya Sorochan | 2024-08-23T14:04:56 | Remove duplicate import of InitFn | diff --git a/src/detail/loongarch64_unix.rs b/src/detail/loongarch64_unix.rs
index 25f5213..c67d03b 100644
--- a/src/detail/loongarch64_unix.rs
+++ b/src/detail/loongarch64_unix.rs
@@ -1,5 +1,4 @@
use crate::detail::align_down;
-use crate::reg_context::InitFn;
use crate::stack::Stack;
std::arch::global_asm!(includ... | 1 | 0 | 1 |
d3e6841f3112c9604d67d32e2a48fad964d0bb66 | Xudong Huang | 2024-07-25T05:38:02 | :pencil: bump version to 0.8.2 | diff --git a/Cargo.toml b/Cargo.toml
index 7c59940..1ad4dfd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.1"
+version = "0.8.2"
edition = "2021"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0"
@@ -20,7 +20,7 @@ exclude = [
... | 1 | 2 | 2 |
d42cd288544f1206c836c09fae0f476f3030a65d | Xudong Huang | 2024-07-22T09:29:20 | :pencil: unlikely is_done | diff --git a/src/gen_impl.rs b/src/gen_impl.rs
index be1b686..001aa43 100644
--- a/src/gen_impl.rs
+++ b/src/gen_impl.rs
@@ -19,6 +19,24 @@ use std::thread;
// windows has a minimal size as 0x4a8!!!!
pub const DEFAULT_STACK_SIZE: usize = 0x1000;
+#[inline]
+#[cold]
+fn cold() {}
+
+// #[inline]
+// fn likely(b: boo... | 1 | 20 | 2 |
32717cac76bed71e0c665ff652ded8d03ae987d8 | Xudong Huang | 2024-06-04T14:15:17 | :pencil: add cfg nightly | diff --git a/Cargo.toml b/Cargo.toml
index 7b69deb..7c59940 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,9 +36,7 @@ libc = "0.2.100"
log = "0.4"
cfg-if = "1.0.0"
-
[build-dependencies]
-cc = "1.0"
rustversion = "1.0"
# release build
diff --git a/benches/lib.rs b/benches/lib.rs
index 37651e9..58b45f2 100644
... | 6 | 20 | 17 |
405959b598d36d122e437a51831d327235b8dd8e | Xudong Huang | 2024-04-29T02:09:05 | :pencil: allow mut_offset unused | diff --git a/src/detail/mod.rs b/src/detail/mod.rs
index a8b92dc..6e5fe66 100644
--- a/src/detail/mod.rs
+++ b/src/detail/mod.rs
@@ -42,6 +42,7 @@ fn align_down(sp: *mut usize) -> *mut usize {
// ptr::mut_offset is positive isize only
#[inline]
+#[allow(dead_code)]
fn mut_offset<T>(ptr: *mut T, count: isize) -> *m... | 1 | 1 | 0 |
25b25e68f3026c4e14510983ffdf421a1c8f3265 | Xudong Huang | 2024-04-29T02:02:03 | :pencil: remove unnecessary allow meta | diff --git a/benches/lib.rs b/benches/lib.rs
index 2317471..37651e9 100644
--- a/benches/lib.rs
+++ b/benches/lib.rs
@@ -9,26 +9,25 @@ use generator::*;
use test::Bencher;
// #[bench]
-#[allow(dead_code)]
-fn yield_bench(b: &mut Bencher) {
- // don't print any panic info
- // when cancel the generator
- pa... | 6 | 23 | 30 |
233fa38e81ebc7f2405cf1056babb6b570c0fe64 | Xudong Huang | 2024-04-29T01:47:07 | :pencil: refine code | diff --git a/src/gen_impl.rs b/src/gen_impl.rs
index b41ec20..be1b686 100644
--- a/src/gen_impl.rs
+++ b/src/gen_impl.rs
@@ -4,17 +4,17 @@
//!
use crate::detail::gen_init;
+use crate::reg_context::RegContext;
+use crate::rt::{Context, ContextStack, Error};
+use crate::scope::Scope;
+use crate::stack::{Func, Stack, ... | 4 | 13 | 20 |
5c123d8fdc813521f6138c31b946886842f77274 | Xudong Huang | 2024-04-26T14:09:28 | :pencil: update windows to 0.56 | diff --git a/Cargo.toml b/Cargo.toml
index fd25432..7b69deb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ exclude = [
[target.'cfg(windows)'.dependencies.windows]
-version = "0.54"
+version = "0.56"
features = [
"Win32_System_Memory",
"Win32_System_Kernel", | 1 | 1 | 1 |
4a3d37cf16cfc18b23d82ce9af0f8902f2939ae4 | Xudong Huang | 2024-03-06T10:37:26 | :pencil: bump version to 0.8.1 | diff --git a/Cargo.toml b/Cargo.toml
index 59b90f3..fd25432 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.8.0"
+version = "0.8.1"
edition = "2021"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0" | 1 | 1 | 1 |
3e74afc55dd56c4536f5bace8f030a17f86fdf68 | Fredrik Fornwall | 2024-03-05T13:04:47 | Update minimum libc version from `0.2` to `0.2.100`
Fixes tests using `cargo +nightly update -Z minimal-versions` to verify
that things work with the minimal dependency version, such as `loom` is
doing.
The minimal version could be lower (the driver is the `si_addr()` method
on `siginfo_t`), but already 0.2.100 is so... | diff --git a/Cargo.toml b/Cargo.toml
index 94cc824..59b90f3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,7 +30,7 @@ features = [
]
[target.'cfg(unix)'.dependencies]
-libc = "0.2"
+libc = "0.2.100"
[dependencies]
log = "0.4" | 1 | 1 | 1 |
c08852139d1bb43e24c24c6eae30eae73f7812f7 | Xudong Huang | 2024-03-04T14:16:42 | :pencil: refine allow clippy warnings | diff --git a/src/gen_impl.rs b/src/gen_impl.rs
index e1ffbeb..b41ec20 100644
--- a/src/gen_impl.rs
+++ b/src/gen_impl.rs
@@ -227,7 +227,7 @@ impl<A> Gn<A> {
impl<A: Any> Gn<A> {
/// create a new generator with default stack size
- #[cfg_attr(feature = "cargo-clippy", allow(clippy::new_ret_no_self))]
+ #[a... | 1 | 1 | 1 |
018b58720c5273e67954144d8ce0e316e284d988 | Xudong Huang | 2024-03-04T10:15:42 | :pencil: bump version to 0.8.0 | diff --git a/Cargo.toml b/Cargo.toml
index b754147..94cc824 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.7.6"
+version = "0.8.0"
edition = "2021"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0" | 1 | 1 | 1 |
018c248ddc2ac9bbef2aa8c20463945a4b1bea41 | Fredrik Fornwall | 2024-03-03T09:17:11 | :pencil: Update windows to 0.54 | diff --git a/Cargo.toml b/Cargo.toml
index 855a225..b754147 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ exclude = [
[target.'cfg(windows)'.dependencies.windows]
-version = "0.53"
+version = "0.54"
features = [
"Win32_System_Memory",
"Win32_System_Kernel", | 1 | 1 | 1 |
605b7bacda2eddea3f080a346ca4a980a043b769 | Xudong-Huang | 2024-02-27T06:44:38 | :pencil: update windows-sys to 0.53 | diff --git a/Cargo.toml b/Cargo.toml
index 3d5949e..855a225 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ exclude = [
[target.'cfg(windows)'.dependencies.windows]
-version = "0.51.1"
+version = "0.53"
features = [
"Win32_System_Memory",
"Win32_System_Kernel",
diff --git a/tests/lib.rs b/tes... | 2 | 5 | 2 |
98f66ea6c1aff15cfa9cda1f7d5d53381a654280 | Xudong Huang | 2024-02-27T06:34:34 | :pencil: bump version to 0.7.6 | diff --git a/Cargo.toml b/Cargo.toml
index b9de221..3d5949e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "generator"
-version = "0.7.5"
+version = "0.7.6"
edition = "2021"
authors = ["Xudong Huang <huangxu008@hotmail.com>"]
license = "MIT/Apache-2.0" | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.