diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e297030b..e135d249 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -110,7 +110,7 @@ jobs: matrix: os: - macos-latest - # - ubuntu-latest + - ubuntu-latest # - windows-latest sdk: - latest @@ -161,7 +161,7 @@ jobs: matrix: os: - macos-latest - # - ubuntu-latest + - ubuntu-latest # - windows-latest sdk: - latest diff --git a/Cargo.lock b/Cargo.lock index 48811522..736bfaf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -362,7 +362,7 @@ dependencies = [ [[package]] name = "cargo-playdate" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "byteorder", @@ -1973,9 +1973,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libgit2-sys" @@ -2574,7 +2574,7 @@ dependencies = [ [[package]] name = "playdate-sys" -version = "0.1.4" +version = "0.1.5" dependencies = [ "heapless", "playdate-bindgen", @@ -3393,9 +3393,9 @@ checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" diff --git a/api/sys/Cargo.toml b/api/sys/Cargo.toml index ccde9694..b87abb47 100644 --- a/api/sys/Cargo.toml +++ b/api/sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "playdate-sys" -version = "0.1.4" +version = "0.1.5" edition = "2021" build = "src/build.rs" diff --git a/api/sys/src/lib.rs b/api/sys/src/lib.rs index 33721a15..7af972ae 100644 --- a/api/sys/src/lib.rs +++ b/api/sys/src/lib.rs @@ -124,7 +124,8 @@ pub mod misc { #[doc(hidden)] #[no_mangle] - #[cfg(target_os = "windows")] + // it not needed on MacOS + #[cfg(not(target_os = "macos"))] // TODO: Somehow link with proper impl: https://stackoverflow.com/q/76439798/829264 pub extern "C" fn _sbrk() {} }; diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml index dda6faef..c1bde2a7 100644 --- a/cargo/Cargo.toml +++ b/cargo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-playdate" -version = "0.1.2" +version = "0.1.3" edition = "2021" readme = "README.md" diff --git a/cargo/tests/build/simple.rs b/cargo/tests/build/simple.rs index 09d7ef88..f9684a6e 100644 --- a/cargo/tests/build/simple.rs +++ b/cargo/tests/build/simple.rs @@ -98,6 +98,12 @@ fn dev_lib_debug() -> Result<()> { } +fn dylib_name() -> String { + const DYLIB_EXT: &str = dylib_suffix_for_host(); + "pdex.".to_owned() + DYLIB_EXT +} + + #[test] /// target: default host fn sim_host_release() -> Result<()> { @@ -112,7 +118,7 @@ fn sim_host_release() -> Result<()> { let cargo_target_fullname = format!("{cargo_package_name}-{LIB_NAME}"); let artifact = export_dir.join("playdate") .join(cargo_target_fullname) - .join(PathBuf::from("build/pdex.dylib")); + .join(PathBuf::from("build/").join(dylib_name())); test_artifact_sim(&artifact, false) } @@ -131,7 +137,7 @@ fn sim_host_debug() -> Result<()> { let cargo_target_fullname = format!("{cargo_package_name}-{LIB_NAME}"); let artifact = export_dir.join("playdate") .join(cargo_target_fullname) - .join(PathBuf::from("build/pdex.dylib")); + .join(PathBuf::from("build/").join(dylib_name())); test_artifact_sim(&artifact, false) } @@ -152,7 +158,7 @@ fn sim_host_release_exp() -> Result<()> { let cargo_target_fullname = format!("{cargo_package_name}-{LIB_NAME}"); let artifact = export_dir.join("playdate") .join(cargo_target_fullname) - .join(PathBuf::from("build/pdex.dylib")); + .join(PathBuf::from("build/").join(dylib_name())); test_artifact_sim(&artifact, false) } @@ -171,7 +177,7 @@ fn dev_sim_release_exp() -> Result<()> { .map(OsStr::new); let expectations = [ ("pdex.elf", dev_target, true), - ("pdex.dylib", &host_target, false), + (&dylib_name(), &host_target, false), ]; for path in simple_crates()? { @@ -283,7 +289,7 @@ mod examples { let expectations = [ ("pdex.elf", dev_target, true), - ("pdex.dylib", &host_target, false), + (&dylib_name(), &host_target, false), ]; for path in simple_crates()? { diff --git a/cargo/tests/crates/simple/bin.rs b/cargo/tests/crates/simple/bin.rs index 363f17a6..97f807d5 100644 --- a/cargo/tests/crates/simple/bin.rs +++ b/cargo/tests/crates/simple/bin.rs @@ -6,4 +6,5 @@ extern crate game; use game::eventHandlerShim; #[used] -pub static EVENT_HANDLER_SHIM: extern "C" fn(*const pd::ffi::PlaydateAPI, pd::ffi::PDSystemEvent, u32) -> i32 = eventHandlerShim; +pub static EVENT_HANDLER_SHIM: extern "C" fn(*const pd::ffi::PlaydateAPI, pd::ffi::PDSystemEvent, u32) -> i32 = + eventHandlerShim;