mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Update examples collection
This commit is contained in:
1
emsdk-cache/emsdk-main/bazel/test_external/.bazelrc
Normal file
1
emsdk-cache/emsdk-main/bazel/test_external/.bazelrc
Normal file
@ -0,0 +1 @@
|
||||
build --incompatible_enable_cc_toolchain_resolution
|
||||
4
emsdk-cache/emsdk-main/bazel/test_external/.gitignore
vendored
Normal file
4
emsdk-cache/emsdk-main/bazel/test_external/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
bazel-bin
|
||||
bazel-out
|
||||
bazel-test_external
|
||||
bazel-testlogs
|
||||
6
emsdk-cache/emsdk-main/bazel/test_external/MODULE.bazel
Normal file
6
emsdk-cache/emsdk-main/bazel/test_external/MODULE.bazel
Normal file
@ -0,0 +1,6 @@
|
||||
bazel_dep(name = "rules_cc", version = "0.1.1")
|
||||
bazel_dep(name = "emsdk")
|
||||
local_path_override(
|
||||
module_name = "emsdk",
|
||||
path = "..",
|
||||
)
|
||||
3696
emsdk-cache/emsdk-main/bazel/test_external/MODULE.bazel.lock
generated
Normal file
3696
emsdk-cache/emsdk-main/bazel/test_external/MODULE.bazel.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
// This file prevents customJSFunctionToTestClosure from being minified by the Closure compiler.
|
||||
Module.customJSFunctionToTestClosure = function() {}
|
||||
@ -0,0 +1,3 @@
|
||||
Module.customJSFunctionToTestClosure = function(firstParam, secondParam) {
|
||||
console.log("This function adds two numbers to get", firstParam + secondParam);
|
||||
}
|
||||
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
@ -0,0 +1,16 @@
|
||||
#include <emscripten/bind.h>
|
||||
|
||||
using namespace emscripten;
|
||||
|
||||
class HelloClass {
|
||||
public:
|
||||
static std::string SayHello(const std::string &name) {
|
||||
return "Yo! " + name;
|
||||
};
|
||||
};
|
||||
|
||||
EMSCRIPTEN_BINDINGS(Hello) {
|
||||
emscripten::class_<HelloClass>("HelloClass")
|
||||
.constructor<>()
|
||||
.class_function("SayHello", &HelloClass::SayHello);
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
std::cout << "hello world!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
|
||||
|
||||
_TEST_TARGETS = [
|
||||
"long_command_line_file01",
|
||||
"long_command_line_file02",
|
||||
"long_command_line_file03",
|
||||
"long_command_line_file04",
|
||||
"long_command_line_file05",
|
||||
"long_command_line_file06",
|
||||
"long_command_line_file07",
|
||||
"long_command_line_file08",
|
||||
"long_command_line_file09",
|
||||
"long_command_line_file10",
|
||||
"long_command_line_file11",
|
||||
"long_command_line_file12",
|
||||
"long_command_line_file13",
|
||||
"long_command_line_file14",
|
||||
"long_command_line_file15",
|
||||
"long_command_line_file16",
|
||||
"long_command_line_file17",
|
||||
"long_command_line_file18",
|
||||
"long_command_line_file19",
|
||||
"long_command_line_file20",
|
||||
]
|
||||
|
||||
_TEST_TARGET_SUFFIXES = [
|
||||
"a",
|
||||
"b",
|
||||
"c",
|
||||
"d",
|
||||
"e",
|
||||
"f",
|
||||
"g",
|
||||
"h",
|
||||
"i",
|
||||
"j",
|
||||
]
|
||||
|
||||
[cc_library(
|
||||
name = "{}_{}".format(target, suffix),
|
||||
hdrs = ["include/{}.hh".format(target)],
|
||||
# stripping include prefix to create more flags passed to emcc
|
||||
strip_include_prefix = "include",
|
||||
srcs = ["{}.cc".format(target)],
|
||||
) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES]
|
||||
|
||||
cc_binary(
|
||||
name = "long_command_line",
|
||||
linkshared = True,
|
||||
srcs = ["long_command_line.cc"],
|
||||
deps = [":{}_{}".format(target, suffix) for target in _TEST_TARGETS for suffix in _TEST_TARGET_SUFFIXES],
|
||||
)
|
||||
|
||||
wasm_cc_binary(
|
||||
name = "long_command_line_wasm",
|
||||
cc_target = ":long_command_line",
|
||||
outputs = [
|
||||
"long_command_line.js",
|
||||
"long_command_line.wasm",
|
||||
],
|
||||
)
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f1();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f2();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f3();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f4();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f5();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f6();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f7();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f8();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f9();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f10();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f11();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f12();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f13();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f14();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f15();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f16();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f17();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f18();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f19();
|
||||
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
void f20();
|
||||
@ -0,0 +1,43 @@
|
||||
#include "long_command_line_file01.hh"
|
||||
#include "long_command_line_file02.hh"
|
||||
#include "long_command_line_file03.hh"
|
||||
#include "long_command_line_file04.hh"
|
||||
#include "long_command_line_file05.hh"
|
||||
#include "long_command_line_file06.hh"
|
||||
#include "long_command_line_file07.hh"
|
||||
#include "long_command_line_file08.hh"
|
||||
#include "long_command_line_file09.hh"
|
||||
#include "long_command_line_file10.hh"
|
||||
#include "long_command_line_file11.hh"
|
||||
#include "long_command_line_file12.hh"
|
||||
#include "long_command_line_file13.hh"
|
||||
#include "long_command_line_file14.hh"
|
||||
#include "long_command_line_file15.hh"
|
||||
#include "long_command_line_file16.hh"
|
||||
#include "long_command_line_file17.hh"
|
||||
#include "long_command_line_file18.hh"
|
||||
#include "long_command_line_file19.hh"
|
||||
#include "long_command_line_file20.hh"
|
||||
|
||||
int main() {
|
||||
f1();
|
||||
f2();
|
||||
f3();
|
||||
f4();
|
||||
f5();
|
||||
f6();
|
||||
f7();
|
||||
f8();
|
||||
f9();
|
||||
f10();
|
||||
f11();
|
||||
f12();
|
||||
f13();
|
||||
f14();
|
||||
f15();
|
||||
f16();
|
||||
f17();
|
||||
f18();
|
||||
f19();
|
||||
f20();
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file01.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f1() { std::cout << "hello from f1()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file02.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f2() { std::cout << "hello from f2()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file03.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f3() { std::cout << "hello from f3()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file04.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f4() { std::cout << "hello from f4()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file05.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f5() { std::cout << "hello from f5()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file06.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f6() { std::cout << "hello from f6()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file07.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f7() { std::cout << "hello from f7()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file08.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f8() { std::cout << "hello from f8()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file09.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f9() { std::cout << "hello from f9()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file10.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f10() { std::cout << "hello from f10()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file11.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f11() { std::cout << "hello from f11()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file12.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f12() { std::cout << "hello from f12()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file13.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f13() { std::cout << "hello from f13()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file14.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f14() { std::cout << "hello from f14()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file15.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f15() { std::cout << "hello from f15()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file16.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f16() { std::cout << "hello from f16()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file17.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f17() { std::cout << "hello from f17()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file18.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f18() { std::cout << "hello from f18()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file19.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f19() { std::cout << "hello from f19()\n"; }
|
||||
@ -0,0 +1,5 @@
|
||||
#include "long_command_line_file20.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void f20() { std::cout << "hello from f20()\n"; }
|
||||
Reference in New Issue
Block a user