Skip to content

Instantly share code, notes, and snippets.

@iceiix
iceiix / gist:60cdb5a3e1aae1550fec21690e18cd86
Created June 29, 2020 00:27
gl-generator clippy: warning: 619 warnings emitted
% cargo clippy
warning: file found to be present in multiple build targets: src/main.rs
warning: unneeded unit return type
--> gl/target/debug/build/steven_gl-d4d9672bf0dda72a/out/bindings.rs:942:65
|
942 | pub unsafe fn ActiveTexture(texture: types::GLenum) -> () { __gl_imports::mem::transmute::<_, extern "system" fn(types::GLenum) -> ()>(storage::ActiveTexture.f)(texture) }
| ^^^^^ help: remove the `-> ()`
|
@iceiix
iceiix / gist:1a42c5587bebfc83c1a4ccfc1a8e053a
Last active May 29, 2019 19:30
Veloren 7bbeea macOS Failed to create window!: RenderError(PipelineError(Program(Pixel(CompilationFailed("ERROR: 0:77: Invalid call of undeclared identifier \'texture2D\'\nERROR: 0:78: Invalid call of undeclared identifier \'texture2D\'\nERROR: 0:79: Invalid call of undeclared identifier \'texture2D
https://old.reddit.com/r/rust_gamedev/comments/bu1ovz/veloren_02_foss_multiplayer_voxel_rpg_is_released/
veloren $ rustc +nightly --version
rustc 1.37.0-nightly (721268583 2019-05-28)
veloren $ git remote -v
origin https://gitlab.com/veloren/veloren.git (fetch)
origin https://gitlab.com/veloren/veloren.git (push)
veloren $ git show
commit 7bbeea2605237eb255c2729fc202e5654d04a4a7 (HEAD -> master, origin/master, origin/HEAD)
veloren $ sw_vers
winit $ cargo build --target wasm32-unknown-emscripten
Compiling winit v0.19.1 (/winit)
warning: unused `#[macro_use]` import
--> src/lib.rs:91:1
|
91 | #[macro_use]
| ^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
@iceiix
iceiix / gist:f4115b185fa3b9ad7fe19b7aa621cf3e
Created May 15, 2019 18:46
Fabric LaunchPack (https://asie.pl/files/FabricLaunchPack/LaunchPack-1.0.0-1.14.zip) mods copied to server, except for Retro-Exchange-1.14-2.1.0.jar
[11:44:19] [main/INFO]: Loading for game Minecraft 1.14
[11:44:19] [ForkJoinPool-1-worker-5/WARN]: Mod ID fmagnet uses outdated schema version: 0 < 1
[11:44:19] [ForkJoinPool-1-worker-3/WARN]: Mod ID fabric uses outdated schema version: 0 < 1
[11:44:19] [ForkJoinPool-1-worker-5/WARN]: Mod ID fabric uses outdated schema version: 0 < 1
[11:44:19] [ForkJoinPool-1-worker-4/WARN]: Mod ID fabric uses outdated schema version: 0 < 1
[11:44:19] [main/INFO]: [FabricLoader] Loading 11 mods: silk@1.2.4-41, fmagnet@${version}, modmenu@1.4.0-71, fabric@0.2.7+build.123, fabricloader@0.4.7+build.147, multiblockapi@1.0.1-1, crochet@1.0.2-1, retroexchange@1.0.0, cutsceneapi@1.0-beta3-1, dispenserfarm@1.0, arcanemagic@1.0-beta2
[11:44:19] [main/WARN]: Mod `fmagnet` (${version}) does not respect SemVer - comparison support is limited.
[11:44:19] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.11 Source=file:fabric-server-launch.jar Service=Knot/Fabric Env=SERVER
[11:44:19] [main/INFO]: Compatibility level set to JAVA_8
[1
[11:33:34] [main/INFO]: Loading for game Minecraft 1.14
[11:33:35] [ForkJoinPool-1-worker-6/WARN]: Mod ID simpleteleporters uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-3/WARN]: Mod ID ladderapi uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-7/WARN]: Mod ID appleskin uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-6/WARN]: Mod ID lil-tater uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-6/WARN]: Mod ID playerplates uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-6/WARN]: Mod ID moreberries uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-7/WARN]: Mod ID simple_pipes uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-7/WARN]: Mod ID sodden uses outdated schema version: 0 < 1
[11:33:35] [ForkJoinPool-1-worker-7/WARN]: Mod ID fabric uses outdated schema version: 0 < 1
@iceiix
iceiix / mousemove.md
Created January 20, 2019 02:08
wasm32-unknown-emscripten bug report draft missing function: emscripten_set_mousemove_callback

IMPORTANT: OUTDATED, SEE rust-windowing/winit#760

Rust stable version 1.32.0 or 1.31.0, wasm32-unknown-emscripten target, compiles with the latest Emscripten SDK, version 1.38.22, but exhibits a binary incompatibility at runtime, crashing with "missing function: emscripten_set_mousemove_callback".

This prevents using popular Rust crates with Emscripten, such as winit: rust-windowing/winit#760 and glutin.

Minimal test case (mousemove.rs):

use std::os::raw::{c_int, c_char, c_void};
@iceiix
iceiix / window.js
Created January 15, 2019 01:04
window.js:7196 missing function: emscripten_set_mousemove_callback - emscripten 1.38.22 + winit issue, https://github.com/kripken/emscripten/issues/7525 https://github.com/tomaka/winit/issues/760
// Copyright 2010 The Emscripten Authors. All rights reserved.
// Emscripten is available under two separate licenses, the MIT license and the
// University of Illinois/NCSA Open Source License. Both these licenses can be
// found in the LICENSE file.
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
@iceiix
iceiix / gist:fc3941d7bc0c639f7eae9d90eacc1212
Created November 5, 2018 02:52
trace_macros on create_ids in steven
diff --git a/src/main.rs b/src/main.rs
index d3a6fbe..79bdcda 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,6 +13,7 @@
// limitations under the License.
#![recursion_limit="300"]
+#![feature(trace_macros)]