change stuff :3 (will break android builds)

This commit is contained in:
griffi-gh 2023-11-20 23:21:50 +01:00
parent 264c72aeb0
commit 3e9e914df3
6 changed files with 8 additions and 14 deletions

View file

@ -1,5 +1,3 @@
#link crt statically on msvc
[target.x86_64-pc-windows-msvc] [target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"] rustflags = ["-Ctarget-feature=+crt-static"]
@ -9,12 +7,5 @@ rustflags = ["-Ctarget-feature=+crt-static"]
[target.i586-pc-windows-msvc] [target.i586-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"] rustflags = ["-Ctarget-feature=+crt-static"]
# enable sse,sse2,avx
[target.'cfg(target_arch = "x86_64")'] [target.'cfg(target_arch = "x86_64")']
rustflags = "-Ctarget-feature=+sse,+sse2,+avx" rustflags = "-Ctarget-feature=+sse,+sse2,+avx"
# use sparse crates.io protocol
[registries.crates-io]
protocol = "sparse"

View file

@ -5,6 +5,7 @@ edition = "2021"
publish = false publish = false
[lib] [lib]
name = "kubilib"
crate-type = ["lib", "cdylib"] crate-type = ["lib", "cdylib"]
[dependencies] [dependencies]

View file

@ -4,5 +4,5 @@
)] )]
fn main() { fn main() {
kubi::kubi_main(); kubilib::kubi_main();
} }

View file

@ -2,7 +2,8 @@ use glam::Mat4;
use shipyard::{Component, AllStoragesViewMut, UniqueViewMut}; use shipyard::{Component, AllStoragesViewMut, UniqueViewMut};
use kubi_shared::{ use kubi_shared::{
entity::{Entity, Health}, entity::{Entity, Health},
player::{PLAYER_HEALTH, PlayerHolding}, player::{Player, PLAYER_HEALTH, PlayerHolding},
block::Block,
networking::{ networking::{
client::{Username, Client, ClientIdMap}, client::{Username, Client, ClientIdMap},
messages::ClientInitData messages::ClientInitData
@ -14,7 +15,6 @@ use crate::{
fly_controller::FlyController, fly_controller::FlyController,
world::raycast::LookingAtBlock, world::raycast::LookingAtBlock,
}; };
pub use kubi_shared::player::Player;
#[derive(Component)] #[derive(Component)]
pub struct MainPlayer; pub struct MainPlayer;
@ -32,7 +32,7 @@ pub fn spawn_player (
Camera::default(), Camera::default(),
FlyController, FlyController,
LookingAtBlock::default(), LookingAtBlock::default(),
PlayerHolding::default(), PlayerHolding(Some(Block::Cobblestone)),
Username("LocalPlayer".into()) Username("LocalPlayer".into())
)); ));
} }

2
rust-toolchain.toml Normal file
View file

@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"