repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/macro.rs
lib/armv9a/src/macro.rs
#[macro_export] macro_rules! define_mask { ($end:expr, $beg:expr) => { ((1 << $end) - (1 << $beg) + (1 << $end)) }; } #[macro_export] macro_rules! define_bitfield { ($field:ident, [$($end:tt-$beg:tt)|*]) => { #[allow(non_upper_case_globals)] pub const $field: u64 = $( define_mask!($...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs.rs
lib/armv9a/src/regs.rs
#![allow(unused_attributes)] #[macro_use] mod macros; mod cptr_el2; mod id_aa64pfr1_el1; mod id_aa64zfr0_el1; mod mdcr_el2; mod pmcr_el0; pub mod pmu; mod smcr_el2; mod svcr; mod zcr_el1; mod zcr_el2; pub use cptr_el2::CPTR_EL2; pub use id_aa64pfr1_el1::ID_AA64PFR1_SME_EL1; pub use id_aa64zfr0_el1::ID_AA64ZFR0_EL1; ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/cptr_el2.rs
lib/armv9a/src/regs/cptr_el2.rs
use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub CPTR_EL2 [ // Trap accesses to CPACR_EL1 from EL1 to EL2, TCPAC OFFSET(31) NUMBITS(1) [], // Trap Activity Monitor access from EL1 and EL0. TAM OFFSET(30) NUMBITS(...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/pmcr_el0.rs
lib/armv9a/src/regs/pmcr_el0.rs
//! Performance Monitors Control Register - EL0 use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub PMCR_EL0 [ /// Number of event counters implemented N OFFSET(11) NUMBITS(5) [], LP OFFSET(7) NUMBITS(1) [], LC OFFS...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/pmu.rs
lib/armv9a/src/regs/pmu.rs
#![allow(unused_imports)] #![allow(unused_attributes)] use tock_registers::interfaces::{Readable, Writeable}; #[macro_export] macro_rules! define_pmu_register { ($mod_name:ident, $reg_name:ident, $reg_literal:tt) => { pub mod $mod_name { use tock_registers::interfaces::{Readable, Writeable}; ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/smcr_el2.rs
lib/armv9a/src/regs/smcr_el2.rs
//! SME Control Register - EL2 use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub SMCR_EL2 [ /// When FEAT_SME_FA64 is implemented: /// Controls whether execution of an A64 instruction is /// considered legal when the PE is...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/zcr_el1.rs
lib/armv9a/src/regs/zcr_el1.rs
//! Realm Management Monitor Configuration Register - EL1 use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub ZCR_EL1 [ RAZWI OFFSET(4) NUMBITS(5) [], LEN OFFSET(0) NUMBITS(4) [] ] } pub struct Reg; impl Readable for Reg { ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/id_aa64pfr1_el1.rs
lib/armv9a/src/regs/id_aa64pfr1_el1.rs
// SPDX-License-Identifier: Apache-2.0 OR MIT // // Copyright (c) 2024 by the author(s) // // Author(s): // - Sangwan Kwon <sangwan.kwon@samsung.com> //! AArch64 Processor Feature Register 1 - EL1 //! //! Provides additional information about implemented PE features in AArch64 state. use tock_registers::{interfaces...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/mdcr_el2.rs
lib/armv9a/src/regs/mdcr_el2.rs
//! Realm Management Monitor Configuration Register - EL2 use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub MDCR_EL2 [ MTPME OFFSET(28) NUMBITS(1) [], HCCD OFFSET(23) NUMBITS(1) [], HPMD OFFSET(17) NUMBITS(1) [], T...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/macros.rs
lib/armv9a/src/regs/macros.rs
// SPDX-License-Identifier: Apache-2.0 OR MIT // // Copyright (c) 2018-2023 by the author(s) // // Author(s): // - Andre Richter <andre.o.richter@gmail.com> macro_rules! __read_raw { ($width:ty, $asm_instr:tt, $asm_reg_name:tt, $asm_width:tt) => { /// Reads the raw bits of the CPU register. #[inl...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/id_aa64zfr0_el1.rs
lib/armv9a/src/regs/id_aa64zfr0_el1.rs
// SPDX-License-Identifier: Apache-2.0 OR MIT // //! AArch64 Processor Feature Register 1 - EL1 //! //! Provides additional information about implemented PE features in AArch64 state. use tock_registers::{interfaces::Readable, register_bitfields}; register_bitfields! {u64, pub ID_AA64ZFR0_EL1 [ /// Suppo...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/zcr_el2.rs
lib/armv9a/src/regs/zcr_el2.rs
//! Realm Management Monitor Configuration Register - EL2 use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub ZCR_EL2 [ RAZWI OFFSET(4) NUMBITS(5) [], LEN OFFSET(0) NUMBITS(4) [] ] } pub struct Reg; impl Readable for Reg { ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/armv9a/src/regs/svcr.rs
lib/armv9a/src/regs/svcr.rs
//! Streaming Vector Control Register //! //! Controls Streaming SVE mode and SME behavior. use tock_registers::{ interfaces::{Readable, Writeable}, register_bitfields, }; register_bitfields! {u64, pub SVCR [ /// Enables SME ZA storage. ZA OFFSET(1) NUMBITS(1) [], /// Enables Strea...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/safe-abstraction/src/lib.rs
lib/safe-abstraction/src/lib.rs
#![warn(rust_2018_idioms)] #![deny(warnings)] #![no_std] //! # Safe Abstraction Crate //! //! The `safe_abstraction` crate is a library designed //! to facilitate safer abstraction over `unsafe` code. //! //! Its primary goal is to enhance the safety of `unsafe` code //! by providing data structures and functions that...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/safe-abstraction/examples/raw-ptr.rs
lib/safe-abstraction/examples/raw-ptr.rs
use safe_abstraction::raw_ptr::{assume_safe, RawPtr, SafetyAssured, SafetyChecked}; struct MyStruct { data: i32, } impl MyStruct { fn new() -> Self { Self { data: 0 } } fn set(&mut self, data: i32) { self.data = data; } fn print(&self) { println!("Data: {:X}", self.da...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/io/src/lib.rs
lib/io/src/lib.rs
#![no_std] #![warn(rust_2018_idioms)] extern crate alloc; pub mod error; use alloc::boxed::Box; pub use error::{Error, ErrorKind}; use spinning_top::{Spinlock, SpinlockGuard}; pub type Result<T> = core::result::Result<T, Error>; pub trait Device { fn initialize(&mut self) -> Result<()>; fn initialized(&self...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/io/src/error.rs
lib/io/src/error.rs
#[derive(Clone, Copy, Debug, PartialEq)] pub enum ErrorKind { NotConnected, AlreadyExists, Unsupported, Other, } #[derive(Debug)] pub struct Error { kind: ErrorKind, } impl Error { pub fn new(kind: ErrorKind) -> Error { Error { kind } } pub fn kind(&self) -> ErrorKind { ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/autopadding/src/lib.rs
lib/autopadding/src/lib.rs
#![no_std] pub extern crate paste; // Unfortunately, [$t: ty; $size: expr] does not matches with array type... // instead, matches all integer primitves here. #[macro_export] macro_rules! type_check_and_init { (u8) => { 0 }; (i8) => { 0 }; (u16) => { 0 }; (i16) => { ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/page.rs
lib/vmsa/src/page.rs
use super::address::{align_down, Address}; use core::marker::PhantomData; /// A generic interface to support all possible page sizes. // /// This is defined as a subtrait of Copy to enable #[derive(Clone, Copy)] for Page. /// Currently, deriving implementations for these traits only works if all dependent types imple...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/guard.rs
lib/vmsa/src/guard.rs
use core::ops::{Deref, DerefMut}; use spinning_top::SpinlockGuard; use super::error::Error; use safe_abstraction::raw_ptr; /// EntryGuard provides a secure interface to access Entry while holding the corresponding lock. /// Also, it is used as a means of accessing "content" placed at the address of Entry under the lo...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/lib.rs
lib/vmsa/src/lib.rs
#![no_std] #![allow(incomplete_features)] #![feature(specialization)] #![feature(generic_const_exprs)] #![warn(rust_2018_idioms)] pub mod address; pub mod error; pub mod guard; pub mod page; pub mod page_table; use armv9a::{define_bitfield, define_bits, define_mask}; define_bits!( RawGPA, // ref. K6.1.2 L0In...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/address.rs
lib/vmsa/src/address.rs
use core::fmt; use core::ops::{Add, AddAssign, BitAnd, BitOr, Sub, SubAssign}; pub trait Address: Add + AddAssign + Copy + From<usize> + Into<usize> + PartialOrd {} /// Align address downwards. /// /// Returns the greatest x with alignment `align` so that x <= addr. /// The alignment must be a power of 2. #[inline(al...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/page_table.rs
lib/vmsa/src/page_table.rs
extern crate alloc; use super::address::{Address, PhysAddr}; use super::error::Error; use super::guard::EntryGuard; use super::page::{Page, PageIter, PageSize}; use alloc::alloc::Layout; use core::marker::PhantomData; use core::slice::Iter; // Safety/TODO: // - As of now, concurrency safety for RTT and Realm page t...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/lib/vmsa/src/error.rs
lib/vmsa/src/error.rs
#[derive(Debug, PartialEq)] pub enum Error { MmStateError, MmInvalidAddr, MmInvalidLevel, MmNoEntry, MmAllocFail, MmRustError, MmUnimplemented, MmIsInUse, MmRefcountError, MmWrongParentChild, MmSubtableError, MmErrorOthers, } impl From<Error> for usize { fn from(err:...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/realm/rsi-test/src/panic.rs
realm/rsi-test/src/panic.rs
#[panic_handler] pub fn panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! { loop {} }
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/realm/rsi-test/src/stack.rs
realm/rsi-test/src/stack.rs
const STACK_SIZE: usize = 0x1000; #[no_mangle] #[link_section = ".stack"] static mut STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/realm/rsi-test/src/mock.rs
realm/rsi-test/src/mock.rs
use core::arch::asm; use core::ptr::addr_of; // TODO: // Detach rmm-spec(data structures & commands) to newly crate. // And use it both rmm and realm const RSI_HOST_CALL: usize = 0xC400_0199; const CMD_GET_SHARED_BUF: u16 = 1; const CMD_SUCCESS: u16 = 2; #[repr(C)] struct HostCall { pub imm: u16, pub padd...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/realm/rsi-test/src/main.rs
realm/rsi-test/src/main.rs
#![no_std] #![no_main] #![feature(asm_const)] #![warn(rust_2018_idioms)] mod entry; mod mock; mod panic; mod stack; #[no_mangle] pub unsafe fn main() -> ! { mock::get_ns_buffer(); mock::exit_to_host(); loop {} }
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/realm/rsi-test/src/entry.rs
realm/rsi-test/src/entry.rs
use core::ptr::addr_of_mut; #[link_section = ".head.text"] #[no_mangle] unsafe extern "C" fn _entry() -> ! { core::arch::asm!( " ldr x0, =__STACK_END__ mov sp, x0 bl setup 1: bl main b 1b", options(noreturn) ) } #[no_mangle] unsafe fn setup() {...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/build.rs
sdk/build.rs
extern crate cbindgen; use std::env; fn main() { let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let mut config: cbindgen::Config = Default::default(); config.header = Some( "/* * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache Licens...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/config.rs
sdk/src/config.rs
pub const TOKEN_COUNT: u64 = 2; pub const TOKEN_PLAT: u16 = 44234; pub const TOKEN_REALM: u16 = 44241; pub const CLAIM_COUNT_REALM_TOKEN: usize = 7; pub const CLAIM_COUNT_PLATFORM_TOKEN: usize = 8; pub const CLAIM_COUNT_SW_COMPONENT: usize = 4; pub const TAG_CCA_TOKEN: u64 = 399; pub const TAG_COSE_SIGN1: u64 = 18; ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/report.rs
sdk/src/report.rs
use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize)] pub struct Report { pub buffer: Vec<u8>, pub user_data: Vec<u8>, }
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/prelude.rs
sdk/src/prelude.rs
pub use crate::attester::attest; pub use crate::error::Error; pub use crate::parser::{parse, print_claims}; pub use crate::report::Report; pub use crate::sealing::{seal, unseal}; pub use crate::verifier::verify;
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/lib.rs
sdk/src/lib.rs
#![deny(warnings)] #![feature(vec_into_raw_parts)] #![warn(rust_2018_idioms)] pub mod attester; pub mod c_api; pub mod error; pub mod prelude; pub mod report; pub mod sealing; pub mod verifier; #[cfg(target_arch = "x86_64")] mod mock; mod parser; cfg_if::cfg_if! { if #[cfg(target_arch = "x86_64")] { pub ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/c_api.rs
sdk/src/c_api.rs
use crate::prelude::*; use bincode::{deserialize, serialize}; use std::ffi::{c_char, c_int, c_uchar, CStr}; use std::slice::{from_raw_parts, from_raw_parts_mut}; const STR_REALM_CHALLENGE: &str = "Realm challenge"; const STR_REALM_INITIAL_MEASUREMENT: &str = "Realm initial measurement"; const STR_USER_DATA: &str = "U...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/parser.rs
sdk/src/parser.rs
use crate::error::Error; use crate::AttestationClaims; use rust_rsi::{print_token, PlatClaims, RealmClaims}; pub fn parse(claims: &AttestationClaims) -> Result<(RealmClaims, PlatClaims), Error> { cfg_if::cfg_if! { if #[cfg(target_arch = "x86_64")] { let mut realm_claims = RealmClaims::from_raw_...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/attester.rs
sdk/src/attester.rs
use crate::error::Error; use crate::report::Report; #[cfg(target_arch = "x86_64")] fn attest_x86_64(user_data: &[u8]) -> Result<Report, Error> { println!("Simulated attestation operation on x86_64."); Ok(Report { buffer: crate::mock::REPORT.to_vec(), user_data: user_data.to_vec(), // Hold user_...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/error.rs
sdk/src/error.rs
use rust_rsi::TokenError; #[derive(Debug)] pub enum Error { CCAToken(TokenError), Claims, Decoding, InvalidArgument, NotSupported, Report, Sealing, SealingKey, Serialize, } impl From<TokenError> for Error { fn from(err: TokenError) -> Self { Error::CCAToken(err) } }...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/mock.rs
sdk/src/mock.rs
const REPORT_LEN: usize = 1737; pub const REPORT: [u8; REPORT_LEN] = [ 0xD9, 0x01, 0x8F, 0xA2, 0x19, 0xAC, 0xCA, 0x59, 0x04, 0x96, 0xD2, 0x84, 0x44, 0xA1, 0x01, 0x38, 0x22, 0xA0, 0x59, 0x04, 0x29, 0xA9, 0x0A, 0x58, 0x20, 0x07, 0xA5, 0x9E, 0xA9, 0xA2, 0x24, 0x9F, 0x68, 0x0A, 0x1B, 0xE8, 0xE0, 0xB2, 0xF0, 0xA...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/sealing.rs
sdk/src/sealing.rs
use crate::error::Error; use openssl::rand::rand_bytes; use openssl::symm::{decrypt_aead, encrypt_aead, Cipher}; use serde::{Deserialize, Serialize}; use zeroize::Zeroizing; // These seal and unseal functions are implemented similarly as in the VMWare's Certifier Framework. // Here are the main assumptions: // - The ...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/src/verifier.rs
sdk/src/verifier.rs
use crate::report::Report; use crate::AttestationClaims; use rust_rsi::{verify_token, TokenError}; pub fn verify(report: &Report) -> Result<AttestationClaims, TokenError> { let claims = verify_token(&report.buffer, None)?; cfg_if::cfg_if! { if #[cfg(target_arch = "x86_64")] { Ok(Attestati...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
islet-project/islet
https://github.com/islet-project/islet/blob/5f541377a34c5daaf01aa148e406370e304fb661/sdk/examples/attest_n_seal.rs
sdk/examples/attest_n_seal.rs
use islet_sdk::prelude::*; fn attestation() -> Result<(), Error> { let user_data = b"User data"; let report = attest(user_data)?; let claims = verify(&report)?; print_claims(&claims); let (realm_claims, plat_claims) = parse(&claims).unwrap(); assert_eq!(&realm_claims.challenge[..user_data.len(...
rust
Apache-2.0
5f541377a34c5daaf01aa148e406370e304fb661
2026-01-04T20:21:26.369655Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/main.rs
src/main.rs
use std::env; use core::utils::TimeEstimation; use database::{DatabaseGenerator, DatabaseLoader}; use env_logger::Env; use log::{info}; use server::{FootballSimulatorServer, GameAppData}; use std::sync::Arc; use tokio::sync::RwLock; #[tokio::main] async fn main() { color_eyre::install().unwrap(); env_logger::...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/dev/neural/src/main.rs
src/dev/neural/src/main.rs
#![recursion_limit = "256"] use burn::backend::{Autodiff, NdArray}; use burn::config::Config; use burn::data::dataloader::batcher::Batcher; use burn::data::dataloader::DataLoaderBuilder; use burn::data::dataset::InMemDataset; use burn::nn::loss::MseLoss; use burn::nn::loss::Reduction::Mean; use burn::optim::AdamConfig...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/dev/graphics/src/main.rs
src/dev/graphics/src/main.rs
//tactics use core::club::player::Player; use core::club::player::PlayerPositionType; use core::club::team::tactics::{MatchTacticType, Tactics}; use core::r#match::ball::Ball; use core::r#match::player::strategies::MatchBallLogic; use core::r#match::player::MatchPlayer; use core::r#match::FootballEngine; use core::r#ma...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
true
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/neural/src/lib.rs
src/neural/src/lib.rs
#![recursion_limit = "256"] mod r#match; use burn::backend::NdArray; use burn::backend::ndarray::NdArrayDevice; pub use burn::prelude::*; pub use r#match::*; // DEFAULTS pub type DefaultNeuralBackend = NdArray; pub const DEFAULT_NEURAL_DEVICE: NdArrayDevice = NdArrayDevice::Cpu;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/neural/src/match/mod.rs
src/neural/src/match/mod.rs
pub mod midfielder; pub use midfielder::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/neural/src/match/midfielder/mod.rs
src/neural/src/match/midfielder/mod.rs
mod passing; pub use passing::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/neural/src/match/midfielder/passing.rs
src/neural/src/match/midfielder/passing.rs
use burn::config::Config; use burn::nn::Initializer; use burn::nn::{Linear, LinearConfig, Relu}; use std::sync::LazyLock; use crate::{DefaultNeuralBackend, DEFAULT_NEURAL_DEVICE}; use burn::prelude::{Backend, Module}; use burn::record::{BinBytesRecorder, FullPrecisionSettings, Recorder}; use burn::tensor::Tensor; sta...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/lib.rs
src/core/src/lib.rs
pub mod simulator; pub use simulator::*; pub mod club; pub mod context; pub mod continent; pub mod country; pub mod league; pub mod r#match; pub mod transfers; pub mod shared; pub mod utils; // Re-export club items pub use club::{ // Modules academy, board, mood, transfers as club_transfers, // Person ex...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/simulator.rs
src/core/src/simulator.rs
use crate::context::{GlobalContext, SimulationContext}; use crate::continent::{Continent, ContinentResult}; use crate::league::League; use crate::r#match::MatchResult; use crate::shared::{SimulatorDataIndexes, TeamData}; use crate::transfers::TransferPool; use crate::utils::Logging; use crate::{Club, Country, Player, T...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/context.rs
src/core/src/context.rs
pub use chrono::prelude::*; use crate::club::{BoardContext, ClubContext, ClubFinanceContext, PlayerContext, StaffContext}; use crate::continent::ContinentContext; use crate::country::CountryContext; use crate::league::LeagueContext; use crate::TeamContext; #[derive(Clone)] pub struct GlobalContext<'gc> { pub simu...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/state.rs
src/core/src/match/state.rs
use crate::r#match::MatchState; pub struct GameState { pub match_state: MatchState, } impl GameState { pub fn new() -> Self { GameState { match_state: MatchState::Initial, } } pub fn set(&mut self, match_state: MatchState) { self.match_state = match_state; } }...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/result.rs
src/core/src/match/result.rs
use nalgebra::Vector3; use serde::Serialize; use std::collections::HashMap; #[derive(Debug, Clone, Serialize)] pub struct PassEventData { pub timestamp: u64, pub from_player_id: u32, pub to_player_id: u32, } impl PassEventData { pub fn new(timestamp: u64, from_player_id: u32, to_player_id: u32) -> Se...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/game.rs
src/core/src/match/game.rs
use super::engine::FootballEngine; use crate::r#match::{MatchResult, MatchSquad}; use log::debug; #[derive(Debug, Clone)] pub struct Match { id: String, league_id: u32, league_slug: String, pub home_squad: MatchSquad, pub away_squad: MatchSquad, } impl Match { pub fn make( id: String, ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/mod.rs
src/core/src/match/mod.rs
pub mod engine; pub mod game; pub mod result; pub mod squad; pub mod state; pub use engine::*; pub use game::*; pub use result::*; pub use squad::*; pub use state::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/field.rs
src/core/src/match/engine/field.rs
use crate::r#match::ball::Ball; use crate::r#match::{FieldSquad, MatchFieldSize, MatchPlayer, MatchSquad, PlayerSide, PositionType, POSITION_POSITIONING}; use crate::Tactics; use nalgebra::Vector3; pub struct MatchField { pub size: MatchFieldSize, pub ball: Ball, pub players: Vec<MatchPlayer>, pub sub...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/engine.rs
src/core/src/match/engine/engine.rs
use crate::r#match::ball::events::GoalSide; use crate::r#match::engine::events::dispatcher::EventCollection; use crate::r#match::events::EventDispatcher; use crate::r#match::field::MatchField; use crate::r#match::result::ResultMatchPositionData; use crate::r#match::{GameTickContext, MatchContext, MatchPlayer, MatchResu...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/result.rs
src/core/src/match/engine/result.rs
use crate::league::LeagueMatch; use crate::r#match::player::statistics::MatchStatisticType; use crate::r#match::{MatchSquad, ResultMatchPositionData}; use std::sync::atomic::{AtomicU8, Ordering}; #[derive(Debug)] pub struct MatchResultRaw { pub score: Option<Score>, pub position_data: ResultMatchPositionData...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/mod.rs
src/core/src/match/engine/mod.rs
pub mod ball; pub mod engine; pub mod events; pub mod field; pub mod player; pub mod raycast; pub mod result; pub mod state; pub mod tactics; pub mod context; pub use ball::*; pub use engine::*; pub use field::*; pub use raycast::*; pub use result::*; pub use state::*; pub use context::*; // Re-export player items e...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/context.rs
src/core/src/match/engine/context.rs
use nalgebra::Vector3; use crate::r#match::{GameState, GoalDetail, GoalPosition, MatchField, MatchFieldSize, MatchPlayerCollection, MatchState, MatchTime, Score, TeamsTactics, MATCH_HALF_TIME_MS}; const MATCH_TIME_INCREMENT_MS: u64 = 10; pub struct MatchContext { pub state: GameState, pub time: MatchTime, ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/raycast/mod.rs
src/core/src/match/engine/raycast/mod.rs
pub mod space; pub use space::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/raycast/space.rs
src/core/src/match/engine/raycast/space.rs
use crate::r#match::{MatchField, MatchPlayer}; use nalgebra::Vector3; pub struct Space { colliders: Vec<SphereCollider>, } impl From<&MatchField> for Space { fn from(field: &MatchField) -> Self { let mut space = Space::new(); // Add ball collider let ball_radius = 0.11; // Assuming th...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/state/manager.rs
src/core/src/match/engine/state/manager.rs
use crate::r#match::{MatchContext, MatchField, MatchState, PlayMatchStateResult}; pub struct StateManager { current_state: MatchState, } impl Default for StateManager { fn default() -> Self { Self::new() } } impl StateManager { pub fn new() -> Self { StateManager { current...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/state/state.rs
src/core/src/match/engine/state/state.rs
#[derive(Debug, Clone, Copy, PartialEq)] pub enum MatchState { Initial, FirstHalf, HalfTime, SecondHalf, ExtraTime, PenaltyShootout, End, } impl MatchState { pub fn need_swap_squads(&self) -> bool { match *self { MatchState::SecondHalf | MatchState::ExtraTime => true...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/state/mod.rs
src/core/src/match/engine/state/mod.rs
pub mod manager; pub mod state; pub use manager::*; pub use state::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/tactics/field.rs
src/core/src/match/engine/tactics/field.rs
use crate::PlayerPositionType; pub const POSITION_POSITIONING: &[(PlayerPositionType, PositionType, PositionType)] = &[ ( PlayerPositionType::Goalkeeper, PositionType::Home(20, 275), PositionType::Away(820, 275), ), ( PlayerPositionType::Sweeper, PositionType::Home(8...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/tactics/paths.rs
src/core/src/match/engine/tactics/paths.rs
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/tactics/mod.rs
src/core/src/match/engine/tactics/mod.rs
pub mod field; pub mod positions; pub mod paths; pub use field::*; pub use positions::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/tactics/positions.rs
src/core/src/match/engine/tactics/positions.rs
use crate::r#match::{PositionType, POSITION_POSITIONING}; use crate::r#match::player::PlayerSide; use crate::PlayerPositionType; #[derive(Debug, Clone)] pub struct MatchTacticalPosition { pub position: PlayerPositionType, pub waypoints: Vec<(f32, f32)>, } #[derive(Debug, Clone)] pub struct TacticalPositions {...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/ball/mod.rs
src/core/src/match/engine/ball/mod.rs
pub mod ball; pub mod events; pub use ball::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/ball/events.rs
src/core/src/match/engine/ball/events.rs
use crate::r#match::events::Event; use crate::r#match::player::events::PlayerEvent; use crate::r#match::{MatchContext, MatchField}; use log::debug; #[derive(Copy, Clone, Debug)] pub enum BallEvent { Goal(BallGoalEventMetadata), Claimed(u32), Gained(u32), TakeMe(u32), } #[derive(Copy, Clone, Debug, Par...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/ball/ball.rs
src/core/src/match/engine/ball/ball.rs
use std::collections::HashMap; use crate::r#match::ball::events::{BallEvent, BallGoalEventMetadata, GoalSide}; use crate::r#match::events::EventCollection; use crate::r#match::{GameTickContext, MatchContext, MatchPlayer, PlayerSide}; use nalgebra::Vector3; pub struct Ball { pub start_position: Vector3<f32>, pu...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
true
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/events/dispatcher.rs
src/core/src/match/engine/events/dispatcher.rs
use crate::r#match::ball::events::{BallEvent, BallEventDispatcher}; use crate::r#match::player::events::{PlayerEvent, PlayerEventDispatcher}; use crate::r#match::{MatchContext, MatchField, ResultMatchPositionData}; pub enum Event { BallEvent(BallEvent), PlayerEvent(PlayerEvent), } pub struct EventCollection {...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/events/mod.rs
src/core/src/match/engine/events/mod.rs
pub mod dispatcher; pub use dispatcher::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/player.rs
src/core/src/match/engine/player/player.rs
use crate::r#match::defenders::states::DefenderState; use crate::r#match::engine::tactics::TacticalPositions; use crate::r#match::events::EventCollection; use crate::r#match::forwarders::states::ForwardState; use crate::r#match::goalkeepers::states::state::GoalkeeperState; use crate::r#match::midfielders::states::Midf...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/state.rs
src/core/src/match/engine/player/state.rs
use crate::r#match::defenders::states::DefenderState; use crate::r#match::events::EventCollection; use crate::r#match::forwarders::states::ForwardState; use crate::r#match::goalkeepers::states::state::GoalkeeperState; use crate::r#match::midfielders::states::MidfielderState; use crate::r#match::{GameTickContext, MatchC...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/mod.rs
src/core/src/match/engine/player/mod.rs
use crate::r#match::{MatchObjectsPositions, StateProcessingContext}; pub mod behaviours; pub mod context; pub mod player; pub mod state; pub mod statistics; pub mod strategies; pub mod positions; pub mod events; mod waypoints; pub use behaviours::*; pub use context::*; use itertools::Itertools; pub use player::*; /...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/context.rs
src/core/src/match/engine/player/context.rs
use crate::r#match::{ MatchField, MatchObjectsPositions, PlayerDistanceClosure, Space }; pub struct GameTickContext { pub positions: MatchObjectsPositions, pub distances: PlayerDistanceClosure, pub ball: BallMetadata, pub space: Space, } impl GameTickContext { pub fn new(field: &MatchField) ->...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/statistics.rs
src/core/src/match/engine/player/statistics.rs
#[derive(Debug, Clone)] pub struct MatchPlayerStatistics { pub items: Vec<MatchPlayerStatisticsItem>, } impl MatchPlayerStatistics { pub fn new() -> Self { MatchPlayerStatistics { items: Vec::with_capacity(5), } } pub fn is_empty(&self) -> bool { self.items.is_empty...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/positions/objects.rs
src/core/src/match/engine/player/positions/objects.rs
use crate::r#match::player_positions::{BallFieldData, PlayerFieldData}; use crate::r#match::{MatchField}; pub struct MatchObjectsPositions { pub ball: BallFieldData, pub players: PlayerFieldData, } impl MatchObjectsPositions { pub fn from(field: &MatchField) -> Self { MatchObjectsPositions { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/positions/closure.rs
src/core/src/match/engine/player/positions/closure.rs
use crate::r#match::{MatchField, VectorExtensions}; use log::debug; use std::cmp::Ordering; use std::collections::BinaryHeap; const MAX_DISTANCE: f32 = 999.0; #[derive(Debug)] pub struct PlayerDistanceClosure { pub distances: BinaryHeap<PlayerDistanceItem>, } #[derive(Debug)] pub struct PlayerDistanceItem { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/positions/mod.rs
src/core/src/match/engine/player/positions/mod.rs
pub mod closure; pub mod players; pub mod ball; pub mod objects; pub use ball::*; pub use closure::*; pub use objects::*; pub use players::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/positions/players.rs
src/core/src/match/engine/player/positions/players.rs
use crate::r#match::{MatchField, PlayerSide}; use nalgebra::Vector3; #[derive(Debug)] pub struct PlayerFieldData { pub items: Vec<PlayerFieldMetadata>, } #[derive(Debug)] pub struct PlayerFieldMetadata { pub player_id: u32, pub side: PlayerSide, pub position: Vector3<f32>, pub velocity: Vector3<f3...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/positions/ball.rs
src/core/src/match/engine/player/positions/ball.rs
use crate::r#match::Ball; use nalgebra::Vector3; pub struct BallFieldData { pub position: Vector3<f32>, pub velocity: Vector3<f32>, pub landing_position: Vector3<f32>, } impl From<&Ball> for BallFieldData { #[inline] fn from(ball: &Ball) -> Self { BallFieldData { position: ball...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/waypoints/mod.rs
src/core/src/match/engine/player/waypoints/mod.rs
use nalgebra::Vector3; const WAYPOINT_REACHED_THRESHOLD: f32 = 25.0; // Increased threshold for larger waypoint distances #[derive(Debug, Clone)] pub struct WaypointManager { pub current_index: usize, pub path_completed: bool, pub loop_path: bool, } impl WaypointManager { pub fn new() -> Self { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/events/mod.rs
src/core/src/match/engine/player/events/mod.rs
pub mod players; pub mod models; pub use models::*; pub use players::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/events/players.rs
src/core/src/match/engine/player/events/players.rs
use crate::r#match::events::Event; use crate::r#match::player::events::{PassingEventContext, ShootingEventContext}; use crate::r#match::player::statistics::MatchStatisticType; use crate::r#match::{GoalDetail, MatchContext, MatchField, MatchPlayer}; use log::debug; use nalgebra::Vector3; use rand::Rng; /// Helper struc...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
true
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/events/models/shooting.rs
src/core/src/match/engine/player/events/models/shooting.rs
use crate::r#match::StateProcessingContext; use nalgebra::Vector3; #[derive(Debug)] pub struct ShootingEventContext { pub from_player_id: u32, pub target: Vector3<f32>, pub force: f64, pub reason: &'static str, } impl ShootingEventContext { pub fn new() -> ShootingEventBuilder{ ShootingEve...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/events/models/mod.rs
src/core/src/match/engine/player/events/models/mod.rs
pub mod passing; pub mod shooting; pub use passing::*; pub use shooting::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/events/models/passing.rs
src/core/src/match/engine/player/events/models/passing.rs
use crate::r#match::StateProcessingContext; use nalgebra::Vector3; #[derive(Debug)] pub struct PassingEventContext { pub from_player_id: u32, pub to_player_id: u32, pub pass_target: Vector3<f32>, pub pass_force: f32, pub reason: &'static str, } impl PassingEventContext { pub fn new() -> Passin...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/behaviours/steering.rs
src/core/src/match/engine/player/behaviours/steering.rs
use crate::r#match::MatchPlayer; use nalgebra::Vector3; pub enum SteeringBehavior { Seek { target: Vector3<f32>, }, Arrive { target: Vector3<f32>, slowing_distance: f32, }, Pursuit { target: Vector3<f32>, target_velocity: Vector3<f32>, }, Evade { ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/behaviours/mod.rs
src/core/src/match/engine/player/behaviours/mod.rs
pub mod steering; pub use steering::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/behaviours/events/dispatcher.rs
src/core/src/match/engine/player/behaviours/events/dispatcher.rs
use crate::r#match::ball::events::{BallEvent, BallEventDispatcher}; use crate::r#match::player::events::{PlayerEvent, PlayerEventDispatcher}; use crate::r#match::{MatchContext, MatchField}; pub enum Event { BallEvent(BallEvent), PlayerEvent(PlayerEvent), } pub struct EventCollection { events: Vec<Event>, ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/behaviours/events/mod.rs
src/core/src/match/engine/player/behaviours/events/mod.rs
pub mod dispatcher; pub use dispatcher::*;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/strategies/processor.rs
src/core/src/match/engine/player/strategies/processor.rs
use crate::r#match::defenders::states::{DefenderState, DefenderStrategies}; use crate::r#match::events::{Event, EventCollection}; use crate::r#match::forwarders::states::{ForwardState, ForwardStrategies}; use crate::r#match::goalkeepers::states::state::{GoalkeeperState, GoalkeeperStrategies}; use crate::r#match::midfie...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/strategies/mod.rs
src/core/src/match/engine/player/strategies/mod.rs
mod common; pub mod defenders; pub mod forwarders; pub mod goalkeepers; pub mod midfielders; pub mod processor; // Re-export common items pub use common::{ ball::{BallOperationsImpl, MatchBallLogic}, passing, players, team, }; pub use common::states as common_states; // Re-export defenders items pub use defe...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/strategies/midfielders/mod.rs
src/core/src/match/engine/player/strategies/midfielders/mod.rs
pub mod states;
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/strategies/midfielders/states/state.rs
src/core/src/match/engine/player/strategies/midfielders/states/state.rs
use crate::r#match::midfielders::states::{MidfielderAttackSupportingState, MidfielderCreatingSpaceState, MidfielderCrossingState, MidfielderDistanceShootingState, MidfielderDistributingState, MidfielderDribblingState, MidfielderHoldingPossessionState, MidfielderInterceptingState, MidfielderPassingState, MidfielderPress...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/core/src/match/engine/player/strategies/midfielders/states/mod.rs
src/core/src/match/engine/player/strategies/midfielders/states/mod.rs
pub mod attack_supporting; pub mod common; pub mod crossing; pub mod distance_shooting; pub mod distributing; pub mod dribbling; pub mod holding_posession; pub mod passing; pub mod pressing; pub mod resting; pub mod returning; pub mod running; pub mod shooting; pub mod standing; pub mod state; pub mod switching_play; p...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false