Skip to content

Instantly share code, notes, and snippets.

View MaulingMonkey's full-sized avatar
🎮
Department of Bad Ideas

MaulingMonkey

🎮
Department of Bad Ideas
View GitHub Profile
C:\local\badmute>type .cargo\config.toml
[unstable]
build-std = ["core", "alloc", "std"]
C:\local\badmute>type src\main.rs
#[repr(C)] #[derive(Debug)] struct P{x:f32,y:f32}
#[repr(C)] #[derive(Debug)] struct Z{x:f32,y:f32}
fn main() {
let mut v = vec![P{x:4.0,y:2.0}];
# ...
[dependencies]
windows.version = "0.41"
# ...
@MaulingMonkey
MaulingMonkey / Wrapping.md
Last active October 18, 2020 18:49
Wrapping Cargo

Premise

I'm authoring a set of build tools / yet another cargo subcommand for creating packages. Prior art includes cargo-apk, cargo-deb, cargo-web, wasm-pack, etc. I'd like to generate temporary Cargo.toml packages as well, which has less prior art.

Example: Windows Wrapper

Would generate:

  • main.rs specifying #![windows_subsystem=...] and a stub main
@MaulingMonkey
MaulingMonkey / 00 - actix-web.md
Last active October 4, 2020 04:41
actix-web notes

EDIT: The original repository appears to have been restored, mooting the need for these notes.

Sources

  • Author has replaced https://github.com/actix/actix-web/ with a "postmortem".
  • Mirror remains up at https://github.com/fafhrd91/actix-web/... for now. This may not last - from the postmortem:

    [..] At the moment I am planing to make repos private and then delete them (will remove benchmarks as well), unless others suggest better ideas.

  • docs.rs / crates.io keep copies of published sources, although without full git history. License is Apache-2.0 OR MIT.
  • A list of forks is bellow. I have PDFs of the recent network graph / contributors / forks as well if needed.
@MaulingMonkey
MaulingMonkey / Rust Policies.md
Last active February 10, 2021 08:18
MaulingMonkey's Rust Policies

Versioning

  • 0.0.1 - Very early, no guarantees made.
  • 0.1.0 - Far from feature complete, but I'm generally begining to care about tracking breaking changes at least.
  • 1.0.0 - Feature complete, strict policies about breaking changes.

Minimum Supported Rust Versions (MSRV)

  • Advertized MSRV should be enforced by CI.
  • Bumping the Advertized MSRV is a breaking change.
#[macro_use] extern crate lazy_static;
use winapi::shared::minwindef::*;
use winapi::um::consoleapi::*;
use winapi::um::winnt::*;
use std::fs::*;
use std::io::Error;
use std::os::windows::io::*;
@MaulingMonkey
MaulingMonkey / Cargo.toml
Last active June 12, 2019 07:28
rust_win32_gdi
[package]
name = "rust_win32_gdi"
edition = "2018"
[target.'cfg(windows)'.dependencies.winapi]
version = "0.3.7"
features = [
"d3d11",
"debugapi",
"libloaderapi",
mod brainfuck;
fn main() {
brainfuck::brainfuck();
}
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace Ulam {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
using System;
using System.Diagnostics;
using System.Drawing;
namespace ProcessingTest {
class Program {
// N.B. KnownGood[-y,+x]
static int[,] KnownGoodData = new int[,]
{ { 36, 35, 34, 33, 32, 31, 30, 55 }
, { 37, 16, 15, 14, 13, 12, 29, 54 }