From a97255e0fc25b25a55d7492c59bf191ff712bb4c Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 4 Feb 2024 10:19:34 -0800 Subject: [PATCH] chore: Bring up winit-core crate Signed-off-by: John Nunley --- Cargo.toml | 3 ++- winit-core/Cargo.toml | 18 ++++++++++++++++++ winit-core/README.md | 3 +++ winit-core/src/lib.rs | 11 +++++++++++ winit/README.md | 1 + 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 winit-core/Cargo.toml create mode 100644 winit-core/README.md create mode 100644 winit-core/src/lib.rs create mode 120000 winit/README.md diff --git a/Cargo.toml b/Cargo.toml index e0fb31914..a8a7ad4c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "run-wasm", - "winit" + "winit", + "winit-core" ] resolver = "2" diff --git a/winit-core/Cargo.toml b/winit-core/Cargo.toml new file mode 100644 index 000000000..3843627d0 --- /dev/null +++ b/winit-core/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "winit-core" +version = "0.1.0" +authors = ["The winit contributors"] +description = "Base types for windowing libraries" +edition = "2021" +keywords = ["windowing"] +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/rust-windowing/winit" +documentation = "https://docs.rs/winit" +categories = ["gui"] +rust-version = "1.70.0" + +[features] +default = ["std"] +std = ["alloc"] +alloc = [] diff --git a/winit-core/README.md b/winit-core/README.md new file mode 100644 index 000000000..86a7cd13b --- /dev/null +++ b/winit-core/README.md @@ -0,0 +1,3 @@ +# winit-core - Base types for a windowing system + +TODO diff --git a/winit-core/src/lib.rs b/winit-core/src/lib.rs new file mode 100644 index 000000000..e08d3ca1d --- /dev/null +++ b/winit-core/src/lib.rs @@ -0,0 +1,11 @@ +//! Base types for a windowing library. +//! +//! This crate contains types, traits and basic functions from [`winit`] that are platform +//! independent. It is intended to allow for other crates to build abstractions around [`winit`] +//! without needing to pull in all of [`winit`]'s dependencies, as well as to provide an +//! interface for alternative backends for [`winit`] to be constructed. +//! +//! [`winit`]: https://docs.rs/winit + +#[cfg(any(not(feature = "std"), not(feature = "alloc")))] +compile_error! { "no-std and no-alloc usage are not yet supported" } diff --git a/winit/README.md b/winit/README.md new file mode 120000 index 000000000..32d46ee88 --- /dev/null +++ b/winit/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file