Rust stdlib-less internal base for source engine games

Overview

source-base

Rust stdlib-less and msvcrt-less internal base for source engine games

Info

Build with cargo build -Zbuild-std

If cargo can't find link.exe either add visual studio dirs to your path or run above command in a visual studio developer command prompt (i have no idea why this happens sorry)

VSCode overrides:

"rust-analyzer.checkOnSave.overrideCommand": [
	"cargo",
	"check",
	"-Zbuild-std",
	"--workspace",
	"--message-format=json",
	"--all-targets"
], 

Features

  • HeapAlloc
  • print / Console writer
  • Interface list iteration
  • Netvar manager
  • Detour hooking via gameoverlayrenderer.dll (createmove example)
  • VMT Hooking (paint + painttraverse example)
  • Engine rendering (drawrect example in painttraverse)

Bugs/TODO

  • Gameoverlay hooking seems to mess up if you unload and inject again, not sure why
  • Messy code in some places as im still learning proper rust game hacking practices (if they even exist yet) while writing this
  • Could be optimized further
  • TODO: Remove the random debug logging
  • TODO: Add gameoverlayrenderer dx9 rendering
  • TODO: Actually implement example features
  • TODO: Config system to go with above todo
You might also like...
Source to relay.fedi.buzz: the customizable ActivityPub relay

buzzrelay A follow-only ActivityPub relay that connects to Mastodon's Streaming API. You don't need to run this yourself, just use the instance at rel

Demo provider, source code for the Provider tutorial.

Fiberplane "Catnip" (tutorial) provider This repository contains the final code of the provider built within the "Create a Provider" tutorial. It reli

An open-source Windows client for Twitch.tv
An open-source Windows client for Twitch.tv

TwitchBox is a lightweight Windows client created to enhance the Twitch.tv experience. The app uses the Tauri framework, which includes a combination

Repo for Monaco, a DCA engine for Solana. Built on Solend and lending protocols (Jet, Solend, Port, etc...)
Repo for Monaco, a DCA engine for Solana. Built on Solend and lending protocols (Jet, Solend, Port, etc...)

Monaco Monaco is a DCA protocol for solana built on top of Serum and compatible with any program that implements or extends the instruction interface

k-mer counter in Rust using the rust-bio and rayon crates

krust is a k-mer counter written in Rust and run from the command line that will output canonical k-mers and their frequency across the records in a f

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code

Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically!

Aws-sdk-rust - AWS SDK for the Rust Programming Language

The AWS SDK for Rust This repo contains the new AWS SDK for Rust (the SDK) and its public roadmap. Please Note: The SDK is currently released as a dev

Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps.

rust-yew-axum-tauri-desktop template Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps. Crates frontend: Yew frontend app for de

A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator
A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator

tmux-thumbs A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints. Usage Press ( prefix + Space

Comments
  • I have a trouble with build

    I have a trouble with build

    When I do cargo check -Zbuild-std, I get this error

    error: the -Z flag is only accepted on the nightly channel of Cargo, but this is the stable channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.

    Okey, no problem, lets use nightly toolchain cargo +nightly check -Zbuild-std Result:

    error: failed to run rustc to learn about target-specific information

    Caused by: process didn't exit successfully: rustc - --crate-name ___ --print=file-names --target \\?\D:\VSP\rust\source-base\targets\i686-pc-windows-minicrt.json --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg (exit code: 1) --- stdout .exe lib.rlib ___.dll ___.dll ___.lib ___.dll C:\Users\Admin.rustup\toolchains\nightly-x86_64-pc-windows-msvc debug_assertions panic="unwind" proc_macro target_abi="" target_arch="x86" target_endian="little" target_env="msvc" target_family="windows" target_feature="fxsr" target_feature="llvm14-builtins-abi" target_feature="sse" target_feature="sse2" target_has_atomic="16" target_has_atomic="32" target_has_atomic="64" target_has_atomic="8" target_has_atomic="ptr" target_has_atomic_equal_alignment="16" target_has_atomic_equal_alignment="32" target_has_atomic_equal_alignment="64" target_has_atomic_equal_alignment="8" target_has_atomic_equal_alignment="ptr" target_has_atomic_load_store="16" target_has_atomic_load_store="32" target_has_atomic_load_store="64" target_has_atomic_load_store="8" target_has_atomic_load_store="ptr" target_os="windows" target_pointer_width="32" target_vendor="pc" windows

    --- stderr error: -Csplit-debuginfo=packed is unstable on this platform

    error: aborting due to previous error

    And cargo +nightly check -Zunstable-options -Zbuild-std do not help Maybe you have a solution?

    opened by Sanceilaks 2
Owner
xxgothhoe
null
An opinionated, practical color management library for games and graphics.

colstodian An opinionated color management library built on top of kolor. Introduction colstodian is a practical color management library for games an

Gray Olson 27 Dec 7, 2022
Rust library to scan files and expand multi-file crates source code as a single tree

syn-file-expand This library allows you to load full source code of multi-file crates into a single syn::File. Features: Based on syn crate. Handling

Vitaly Shukela 11 Jul 27, 2022
A cargo subcommand that displays the assembly generated for Rust source code

cargo-show-asm A cargo subcommand that displays the assembly generated for Rust source code.

null 193 Dec 29, 2022
Free and open-source reimplementation of Native Mouse Lock (display_mouse_lock) in rust.

dml-rs display_mouse_lock in rust. Free, open-source reimplementation of display_mouse_lock (Native Mouse Lock) in Rust. Written because I felt like i

Tomat 4 Feb 12, 2023
Open-source Rewind.ai clone written in Rust and Vue running 100% locally with whisper.cpp

mind-overflow Open-source Rewind.AI clone built with Tauri and Vue. Leverages whisper.cpp for Speech-to-Text and (wip: llama.cpp for Text generation a

Maxime Dolores 4 Aug 9, 2023
Open Source terraform provider registry

Terustry Simple configurable proxy that implement terraform provider registry protocol, to build your own terraform provider private registry. How it

Open-Source by Veepee 53 Nov 24, 2022
Open-source NI maschine device handling

Open-source NI maschine device handling

william light 69 Dec 1, 2022
Extracting react native app source code from apk file.

extract-myreact Extracting React Native app source code from apk file.

Aan 3 Oct 5, 2022
Ruplacer - Find and replace text in source files

Ruplacer - Find and replace text in source files

Dimitri Merejkowsky 331 Dec 28, 2022
Ector is an open source async, no-alloc actor framework for embedded devices

Ector is an open source async, no-alloc actor framework for embedded devices. Ector is an open source async, no-alloc actor framework for embedded dev

Drogue IoT 11 Dec 15, 2022