diff --git a/Cargo.lock b/Cargo.lock index 576ae3c..b9af997 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,6 +89,7 @@ name = "pacman" version = "0.1.0" dependencies = [ "lazy_static", + "libc", "sdl2", "spin_sleep", "tracing", diff --git a/Cargo.toml b/Cargo.toml index c2d6899..83d775d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,13 @@ tracing-error = "0.2.0" tracing-subscriber = {version = "0.3.17", features = ["env-filter"]} winapi = { version = "0.3", features = ["consoleapi", "fileapi", "handleapi", "processenv", "winbase", "wincon", "winnt", "winuser", "windef", "minwindef"] } -[dependencies.sdl2] + +[target.'cfg(target_os = "emscripten")'.dependencies.sdl2] +version = "0.38" +default-features = false +features = ["ttf","image","gfx","mixer"] + +[target.'cfg(not(target_os = "emscripten"))'.dependencies.sdl2] version = "0.38" default-features = false features = ["ttf","image","gfx","mixer","static-link","use-vcpkg"] @@ -24,4 +30,8 @@ git = "https://github.com/microsoft/vcpkg" rev = "2024.05.24" # release 2024.05.24 # to check for a new one, check https://github.com/microsoft/vcpkg/releases [package.metadata.vcpkg.target] -x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" } \ No newline at end of file +x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" } +stable-x86_64-unknown-linux-gnu = { triplet = "x86_64-unknown-linux-gnu" } + +[target.'cfg(target_os = "emscripten")'.dependencies] +libc = "0.2.16" \ No newline at end of file