Skip to content

Instantly share code, notes, and snippets.

View ahndmal's full-sized avatar
😔
stand with my homeland Ukraine

Andrii Maliuta ahndmal

😔
stand with my homeland Ukraine
View GitHub Profile
window.addEventListener('load', function () {
// canvas setup
const canvas = document.getElementById('canvas1');
const ctx = canvas.getContext('2d');
canvas.width = 700;
canvas.height = 500;
class InputHandler {
constructor(game) {
this.game = game;
plugins {
java
}
version = "1.0.0"
repositories {
mavenCentral()
}
plugins {
id 'java'
}
version = '1.0.0'
repositories {
mavenCentral()
}
Install cargo-component:
cargo install --locked cargo-component
Install wasm-tools:
cargo install --locked wasm-tools
Install wasmtime:
%PDF-1.7
%¿÷¢þ
%QDF-1.0
1 0 obj
<<
/Lang (en-US)
/OpenAction [
3 0 R
/XYZ
# build runnable JAR
# kotlinc hello.kt -include-runtime -d hello.jar
kotlinc main.kt -include-runtime -d main.jar
# Compile a library
kotlinc hello.kt -d hello.jar
# Run a script
kotlinc -script list_folders.kts -- -d <path_to_folder_to_inspect>
<html>
<head>
<meta charset="utf-8"/>
<script src="wasm_exec.js"></script>
<script>
const go = new Go();
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
</script>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>Canvas tutorial</title>
<style>
canvas {
border: 1px solid black;
}
</style>
%PDF-2.0
1 0 obj
<<
/Pages 2 0 R
/Type /Catalog
>>
endobj
2 0 obj
<<
/Count 1
use axum::{Router, routing::get, Json};
use serde::Serialize;
use std::{sync::Arc, time::SystemTime};
#[derive(Serialize)]
struct Health {
status: &'static str,
uptime_seconds: u64,
}