Skip to content

Instantly share code, notes, and snippets.

View kjpou1's full-sized avatar

Kenneth Pouncey kjpou1

  • KI Consultants Europe, S.a.r.L
View GitHub Profile
obj.__owns_handle__ = true;
// If this is the global object we do not want to release it.
if (typeof ___mono_wasm_global___ !== "undefined" && ___mono_wasm_global___ === obj)
obj.__owns_handle__ = false;
@kjpou1
kjpou1 / src_mono_wasm_Makefile
Last active May 25, 2020 11:32
Fix wasm sample
diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile
index e652422d1ae..7950d96cf41 100644
--- a/src/mono/wasm/Makefile
+++ b/src/mono/wasm/Makefile
@@ -11,6 +11,7 @@ OBJDIR?=$(TOP)/artifacts/obj
PINVOKE_TABLE?=$(TOP)/artifacts/obj/mono/Browser.wasm.$(CONFIG)/wasm/pinvoke-table.h
MONO_BIN_DIR?=$(BINDIR)/mono/Browser.wasm.$(CONFIG)
SYS_NATIVE_DIR?=$(BINDIR)/native/net5.0-Browser-$(CONFIG)-wasm/
+RUNTIME_PACK_DIR=$(TOP)/artifacts/bin/lib-runtime-packs/net5.0-Browser-$(CONFIG)-wasm/runtimes/browser-wasm/native/wasm
@kjpou1
kjpou1 / console.txt
Created October 9, 2019 10:16
interp-wasmIOS13
This file has been truncated, but you can view the full file.
[Log] WASM: MONO-WASM: Loaded: netstandard.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: System.Core.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: System.Drawing.Common.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: Mono.Security.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: mscorlib.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: System.Numerics.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: WasmIOS13.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: System.Net.Http.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: System.ServiceModel.Internals.dll (runtime.js, line 9)
[Log] WASM: MONO-WASM: Loaded: WebAssembly.Net.Http.dll (runtime.js, line 9)
@kjpou1
kjpou1 / HowToUpgradeMono.md
Last active June 21, 2019 08:38
Update Blazor for Asp.Net tests
@kjpou1
kjpou1 / WasmSampleBuffer.js
Created November 2, 2018 08:42
WasmSampleBuffer javascript call
var App = {
init: function () {
var bufferPtr = BINDING.call_static_method("[WasmSampleBuffer]WasmSampleBuffer.MyLib:Func", []);
console.log('IntPtr value from Marshal.AllocHGlobal: ' + bufferPtr);
var szLength = 5;
// Create a mapped view over emscripten's Heap.
var floatArrayHeapMapped = new Float32Array(Module.HEAPF32.buffer, bufferPtr, 5 );
@kjpou1
kjpou1 / WasmSampleBuffer.cs
Created November 2, 2018 08:38
wasm buffer pointer from Marshal.AllocHGlobal
using System;
using System.Runtime.InteropServices;
using WebAssembly;
namespace WasmSampleBuffer
{
public class MyLib
{
static IntPtr unmanagedMemory;
@kjpou1
kjpou1 / gist:90aa97676ac78980231f
Created January 14, 2016 13:52
1.7.0 pre to 1.7.1
Attempting to gather dependencies information for package 'CocosSharp.1.7.1' with respect to project 'CocosSharpGame2-1_7_0pre1', targeting '.NETPortable,Version=v4.5,Profile=Profile111'
Attempting to resolve dependencies for package 'CocosSharp.1.7.1' with DependencyBehavior 'Lowest'
Resolving actions to install package 'CocosSharp.1.7.1'
Resolved actions to install package 'CocosSharp.1.7.1'
Attempting to gather dependencies information for package 'CocosSharp.1.7.1' with respect to project 'CocosSharpGame2-1_7_0pre1.WinPhone', targeting 'WindowsPhoneApp,Version=v8.1'
Attempting to resolve dependencies for package 'CocosSharp.1.7.1' with DependencyBehavior 'Lowest'
Resolving actions to install package 'CocosSharp.1.7.1'
Resolved actions to install package 'CocosSharp.1.7.1'
Attempting to gather dependencies information for package 'CocosSharp.1.7.1' with respect to project 'CocosSharpGame2-1_7_0pre1.Droid', targeting 'MonoAndroid,Version=v6.0'
Attempting to resolve dependencies for package 'CocosSharp.1.7.1
@kjpou1
kjpou1 / gist:8369502
Created January 11, 2014 10:59
MonoMac.dll Custom Build for System.Drawing CoreGraphics
#
# Figure out if I want to use [New] or remove from contract
#
WARNINGS_I_SHOULD_FIX=114,108
TARGET = MonoMac.dll
PEER=false
MACCORE_DIR ?= ../../maccore
#
# CORE_SOURCES are source files that are written by hand