-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix failing test for new rustc * Move to edition 2021. Fix repo-link in repo * format * fix: Better span-info in derive macro error-messages * feat: Better diagnostics when correct traits not implemented by user, and also explicit minimum rustc version specified Signed-off-by: Anders Musikka <[email protected]>
- Loading branch information
Showing
15 changed files
with
183 additions
and
38 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
name = "savefile-abi-min" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.74" | ||
|
||
|
||
|
||
|
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
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,11 +1,12 @@ | ||
[package] | ||
name = "savefile-abi" | ||
version = "0.17.3" | ||
version = "0.17.4" | ||
edition = "2021" | ||
authors = ["Anders Musikka <[email protected]>"] | ||
documentation = "https://docs.rs/savefile-abi/" | ||
homepage = "https://github.com/avl/savefile/blob/master/savefile-abi/README.md" | ||
repository = "https://github.com/avl/savefile" | ||
rust-version = "1.74" | ||
|
||
description = "Easy to use, simple, stable ABI for Rust-libraries. Allows creating dynamically loadable plugins written in rust." | ||
|
||
|
@@ -16,7 +17,16 @@ keywords = ["dylib", "dlopen", "ffi"] | |
license = "MIT/Apache-2.0" | ||
|
||
[dependencies] | ||
savefile = { path="../savefile", version = "=0.17.3" } | ||
savefile-derive = { path="../savefile-derive", version = "=0.17.3" } | ||
savefile = { path="../savefile", version = "=0.17.4" } | ||
savefile-derive = { path="../savefile-derive", version = "=0.17.4" } | ||
byteorder = "1.4" | ||
libloading = "0.8" | ||
|
||
[features] | ||
# Rust version is > 1.78 | ||
# Automatically set by build.rs | ||
rust1_78=[] | ||
|
||
|
||
[build-dependencies] | ||
rustc_version="0.2" |
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,8 @@ | ||
extern crate rustc_version; | ||
use rustc_version::{version_meta, Channel, Version}; | ||
fn main() { | ||
let version = version_meta().unwrap(); | ||
if version.semver >= Version::new(1,78,0) { | ||
println!("cargo:rustc-cfg=feature=\"rust1_78\""); | ||
} | ||
} |
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
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,9 +1,9 @@ | ||
[package] | ||
name = "savefile-derive" | ||
version = "0.17.3" | ||
version = "0.17.4" | ||
authors = ["Anders Musikka <[email protected]>"] | ||
repository = "https://github.com/avl/savefile" | ||
|
||
rust-version = "1.74" | ||
description = "Custom derive macros for savefile crate - simple, convenient, fast, versioned, binary serialization/deserialization library." | ||
|
||
readme = "../README.md" | ||
|
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
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,6 +1,6 @@ | ||
[package] | ||
name = "savefile" | ||
version = "0.17.3" | ||
version = "0.17.4" | ||
authors = ["Anders Musikka <[email protected]>"] | ||
documentation = "https://docs.rs/savefile/" | ||
homepage = "https://github.com/avl/savefile/" | ||
|
@@ -32,8 +32,14 @@ serde_derive = ["dep:serde_derive","serde"] | |
size_sanity_checks = [] | ||
# Use features only available on the nightly rust-compiler. | ||
# Enabling this provides slightly better introspection support. | ||
# Automatically set by build.rs for nightly compilers | ||
nightly=[] | ||
|
||
# Rust version is > 1.78 | ||
# Automatically set by build.rs | ||
rust1_78=[] | ||
|
||
|
||
compression = ["bzip2"] | ||
|
||
encryption = ["ring", "rand"] | ||
|
@@ -53,13 +59,13 @@ bit-set = {version = "0.5", optional = true} | |
rustc-hash = {version = "1.1", optional = true} | ||
memoffset = "0.9" | ||
byteorder = "1.4" | ||
savefile-derive = {path="../savefile-derive", version = "=0.17.3", optional = true } | ||
savefile-derive = {path="../savefile-derive", version = "=0.17.4", optional = true } | ||
serde_derive = {version= "1.0", optional = true} | ||
serde = {version= "1.0", optional = true} | ||
quickcheck = {version= "1.0", optional = true} | ||
|
||
[dev-dependencies] | ||
savefile-derive = { path="../savefile-derive", version = "=0.17.3" } | ||
savefile-derive = { path="../savefile-derive", version = "=0.17.4" } | ||
|
||
[build-dependencies] | ||
rustc_version="0.2" | ||
|
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,7 +1,11 @@ | ||
extern crate rustc_version; | ||
use rustc_version::{version_meta, Channel}; | ||
use rustc_version::{version_meta, Channel, Version}; | ||
fn main() { | ||
if version_meta().unwrap().channel == Channel::Nightly { | ||
let version = version_meta().unwrap(); | ||
if version.channel == Channel::Nightly { | ||
println!("cargo:rustc-cfg=feature=\"nightly\""); | ||
} | ||
if version.semver >= Version::new(1,78,0) { | ||
println!("cargo:rustc-cfg=feature=\"rust1_78\""); | ||
} | ||
} |
Oops, something went wrong.