Skip to content

Instantly share code, notes, and snippets.

View zicklag's full-sized avatar
🛰️
Making awesome stuff!

Zicklag zicklag

🛰️
Making awesome stuff!
View GitHub Profile
@zicklag
zicklag / Cargo.toml
Created October 7, 2021 17:06
Bevy Retrograde LDtk Map Example
[package]
name = "test_bevy_retro"
version = "0.1.0"
edition = "2018"
[dependencies]
bevy = {version = "0.5", default-features = false}
bevy_retrograde = { version = "0.2", features = ["ldtk"] }
hex = "0.4.3"
@zicklag
zicklag / timings.html
Created July 20, 2021 14:49
Naga + Argh Build Timings
<html>
<head>
<title>Cargo Build Timings — naga-cli 0.4.0</title>
<meta charset="utf-8">
<style type="text/css">
html {
font-family: sans-serif;
}
@zicklag
zicklag / lib.rs
Created June 16, 2021 16:50
Convert GLSL 4.5 to GLSL ES 1.0 in Rust
pub use shaderc;
pub use spirv_cross;
use spirv_cross::{glsl, spirv, ErrorCode};
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Error compiling GLSL to SPIR-V: {0}")]
ShadercError(#[from] shaderc::Error),
#[error("Error compileing SPIR-V to GLSL: {0}")]
SpirvCrossError(#[from] ErrorCode),
@zicklag
zicklag / lib.rs
Last active October 13, 2020 18:41
Starter main.rs and lib.rs files for Rust applications
use thiserror::Error;
use tracing as trc;
/// An error that indicates that the program should exit with the given code
#[derive(Error, Debug)]
#[error("Program exited {0}")]
struct Exit(i32);
fn run() {
// Install tracing for logs
@zicklag
zicklag / README.md
Created August 12, 2020 23:42
Bevy Dynamic Systems & Components Design Plan

Bevy Dynamic Systems & Components Design Plan

Design Changes

TypeId -> ComponentId

TypeId's ( which have some discussion about the formulation of which in this issue ) would need to become ComponentId's as they are ID's that must be unique to a specific component that may or may not be associated to a Rust type.

@zicklag
zicklag / main.rs
Created April 4, 2020 23:03
Super messy Rust macro backup
#[macro_use]
extern crate tectonic_cfg_support;
macro_rules! cfg_aliases {
// @config rules parse the cfg predicates and expand aliases inside of them
(@config not($config:tt)) => {
not(cfg_aliases!(@config $config))
};
(@config any($config:tt)) => {
any(cfg_aliases!(@config $config))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zicklag
zicklag / .gitignore
Created February 28, 2020 20:48
These are the coolest two lines that should be in *every* .gitignore file
# Ignore everything that has "gitignore" in the name, except for the .gitignore file
*gitignore*
!.gitignore
# This makes it super easy to backup source files and other resources that you happen to want in your repo
# dir at the moment, but that you don't want to end up accidentally commiting.
@zicklag
zicklag / PasswordGen.ipynb
Created February 21, 2020 22:45
Password generation in Rust
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zicklag
zicklag / install.sh
Created February 20, 2020 01:28
RethinkDB Client Charm
#!/bin/bash
lucky set-status active 'Installed'