cluaupp 1.5.2-cf → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/cluaupp.js +0 -36
- package/examples/game/src/Client/Controllers/DataController.client.clpp +2 -2
- package/examples/game/src/Client/Main.client.clpp +1 -1
- package/examples/game/src/Modules/Core/Guard.server.clpp +2 -2
- package/examples/game/src/Modules/Core/PlayerHandler.server.clpp +2 -2
- package/examples/game/src/Server/Boot/DataBoot.server.clpp +3 -3
- package/examples/game/src/Server/Main.server.clpp +1 -1
- package/package.json +2 -6
- package/templates/game/src/Client/Controllers/DataController.client.clpp +2 -2
- package/templates/game/src/Client/Main.client.clpp +1 -1
- package/templates/game/src/Modules/Core/Guard.server.clpp +2 -2
- package/templates/game/src/Modules/Core/PlayerHandler.server.clpp +2 -2
- package/templates/game/src/Server/Boot/DataBoot.server.clpp +3 -3
- package/templates/game/src/Server/Main.server.clpp +1 -1
- package/editors/vscode/syntaxes/clpp.tmLanguage.json +0 -90
- package/native/bin/.gitkeep +0 -1
- package/rust/cluaupp/Cargo.lock +0 -795
- package/rust/cluaupp/Cargo.toml +0 -17
- package/rust/cluaupp/src/main.rs +0 -717
- package/scripts/postinstall-native.js +0 -52
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Cluaupp is the **Roblox project host** for [CL++](https://kartzrbx.github.io/CLP
|
|
|
17
17
|
Native PascalCase CluauppLibs: **Flare** net, **Sweep** zelador, **Spark** signal, **Keep** data, **Mint** numbers, **Axiom** math, **Roster** tables, **Gleam** UI, **Bloom** effects, **Lens** debug UI, **Crest** topbar, **Pin** billboard, **Stage** viewport 3D, **Coil** spring, **Helm** commands, **Shift** states, **Hive** ECS, **Ward** anti-cheat, **Ember** VFX, **Echo** replication, **Guide** tutorials, **Trace** pretty-print. Schemas pack u8 ids / ColorSequence / tables — never JSON on the hot path. Name map: [`runtime/SOURCES.md`](runtime/SOURCES.md).
|
|
18
18
|
|
|
19
19
|
```clpp
|
|
20
|
-
|
|
20
|
+
#include <clpp/roblox.clh>
|
|
21
21
|
|
|
22
22
|
struct HelloServer {
|
|
23
23
|
void Greet(Player player);
|
package/bin/cluaupp.js
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
const fs = require("node:fs");
|
|
5
|
-
const path = require("node:path");
|
|
6
|
-
const { spawnSync } = require("node:child_process");
|
|
7
|
-
|
|
8
|
-
function exeName() {
|
|
9
|
-
return process.platform === "win32" ? "cluaupp.exe" : "cluaupp";
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function nativeCandidates(pkgRoot) {
|
|
13
|
-
const platform = process.platform;
|
|
14
|
-
const arch = process.arch;
|
|
15
|
-
return [
|
|
16
|
-
process.env.CLUAUPP_NATIVE_BIN,
|
|
17
|
-
path.join(pkgRoot, "native", "bin", exeName()),
|
|
18
|
-
path.join(pkgRoot, "native", `${platform}-${arch}`, exeName()),
|
|
19
|
-
].filter(Boolean);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function runNativeIfPresent() {
|
|
23
|
-
const pkgRoot = path.resolve(__dirname, "..");
|
|
24
|
-
process.env.CLUAUPP_HOME = process.env.CLUAUPP_HOME || pkgRoot;
|
|
25
|
-
for (const bin of nativeCandidates(pkgRoot)) {
|
|
26
|
-
if (!fs.existsSync(bin)) continue;
|
|
27
|
-
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit", windowsHide: true });
|
|
28
|
-
if (typeof result.status === "number") {
|
|
29
|
-
process.exit(result.status);
|
|
30
|
-
}
|
|
31
|
-
if (result.error) {
|
|
32
|
-
console.warn("cluaupp: native failed, falling back to Node:", result.error.message);
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
runNativeIfPresent();
|
|
40
4
|
require("../generated/cli.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#pragma strict
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
#include <clpp/roblox.clh>
|
|
3
|
+
#include <clpp/libs/keep.clh>
|
|
4
|
+
import { PlayerTemplate } from "../../Include/GameTypes.clh";
|
|
5
5
|
|
|
6
6
|
void init() {
|
|
7
7
|
PlayerTemplate playerData = PlayerTemplate();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cluaupp",
|
|
3
|
-
"version": "1.5.2
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Cluaupp toolchain — compile CL++ to Luau with Rojo and CluauppLibs.",
|
|
5
5
|
"author": "KartzDev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,8 +17,6 @@
|
|
|
17
17
|
"bin",
|
|
18
18
|
"src",
|
|
19
19
|
"generated",
|
|
20
|
-
"rust",
|
|
21
|
-
"native",
|
|
22
20
|
"include",
|
|
23
21
|
"templates",
|
|
24
22
|
"examples",
|
|
@@ -29,7 +27,6 @@
|
|
|
29
27
|
"data",
|
|
30
28
|
"plugins",
|
|
31
29
|
"scripts/postinstall-editor.js",
|
|
32
|
-
"scripts/postinstall-native.js",
|
|
33
30
|
"README.md",
|
|
34
31
|
"LICENSE",
|
|
35
32
|
"CHANGELOG.md",
|
|
@@ -43,10 +40,9 @@
|
|
|
43
40
|
"cluau": "node bin/cluaupp.js",
|
|
44
41
|
"build": "tsc",
|
|
45
42
|
"build:cli": "tsc",
|
|
46
|
-
"build:native": "cargo build --release --manifest-path rust/cluaupp/Cargo.toml",
|
|
47
43
|
"dev:cli": "tsx src/cli.ts",
|
|
48
44
|
"prepare": "tsc",
|
|
49
|
-
"postinstall": "node scripts/postinstall-
|
|
45
|
+
"postinstall": "node scripts/postinstall-editor.js",
|
|
50
46
|
"test": "node test/security.test.js && node test/understander.test.js && node test/out.test.js && node test/types.test.js && node test/modules.test.js && node test/modules-import.test.js && node test/gen-rojo-tree.test.js && node test/get-service.test.js && node test/clpp.test.js && node test/flare.test.js && node test/native.test.js && node test/postprocess.test.js && node test/api.test.js && node test/api-reuse.test.js && node test/context-safety.test.js && node test/datamodel.test.js && node test/platform-analyzers.test.js && node test/platform-extras.test.js && node test/generator.test.js && node test/studio/smoke.test.js",
|
|
51
47
|
"test:clpp-contract": "node test/clpp.test.js",
|
|
52
48
|
"generate-api": "node scripts/generate-api.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#pragma strict
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
#include <clpp/roblox.clh>
|
|
3
|
+
#include <clpp/libs/keep.clh>
|
|
4
|
+
import { PlayerTemplate } from "../../Include/GameTypes.clh";
|
|
5
5
|
|
|
6
6
|
void init() {
|
|
7
7
|
PlayerTemplate playerData = PlayerTemplate();
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
-
"name": "CL++",
|
|
4
|
-
"scopeName": "source.clpp",
|
|
5
|
-
"patterns": [
|
|
6
|
-
{ "include": "#comments" },
|
|
7
|
-
{ "include": "#directives" },
|
|
8
|
-
{ "include": "#link" },
|
|
9
|
-
{ "include": "#attributes" },
|
|
10
|
-
{ "include": "#strings" },
|
|
11
|
-
{ "include": "#receiver" },
|
|
12
|
-
{ "include": "#keywords" },
|
|
13
|
-
{ "include": "#types" },
|
|
14
|
-
{ "include": "#constants" },
|
|
15
|
-
{ "include": "#numbers" },
|
|
16
|
-
{ "include": "#operators" },
|
|
17
|
-
{ "include": "#properties" },
|
|
18
|
-
{ "include": "#functions" }
|
|
19
|
-
],
|
|
20
|
-
"repository": {
|
|
21
|
-
"comments": {
|
|
22
|
-
"patterns": [
|
|
23
|
-
{ "name": "comment.line.double-slash.clpp", "match": "//.*$" },
|
|
24
|
-
{ "name": "comment.block.clpp", "begin": "/\\*", "end": "\\*/" }
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"directives": {
|
|
28
|
-
"patterns": [
|
|
29
|
-
{
|
|
30
|
-
"match": "^\\s*(#(pragma|define|ifdef|ifndef|endif))\\b.*$",
|
|
31
|
-
"name": "meta.preprocessor.clpp",
|
|
32
|
-
"captures": { "1": { "name": "keyword.control.directive.clpp" } }
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"link": {
|
|
37
|
-
"patterns": [
|
|
38
|
-
{ "name": "keyword.control.link.clpp", "match": "^\\s*\\blink\\b" },
|
|
39
|
-
{ "name": "keyword.control.link.as.clpp", "match": "\\b(as|from)\\b" },
|
|
40
|
-
{ "name": "support.namespace.clpp", "match": "@(clpp|game)(?:\\.[A-Za-z_][A-Za-z0-9_]*)*" }
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
"attributes": {
|
|
44
|
-
"name": "support.type.annotation.clpp",
|
|
45
|
-
"match": "\\[\\[(server|client|shared)\\]\\]|@(server|client|parallel)\\b"
|
|
46
|
-
},
|
|
47
|
-
"strings": {
|
|
48
|
-
"patterns": [
|
|
49
|
-
{ "name": "string.quoted.double.clpp", "begin": "\"", "end": "\"" },
|
|
50
|
-
{ "name": "string.quoted.single.clpp", "begin": "'", "end": "'" },
|
|
51
|
-
{ "name": "string.quoted.other.clpp", "begin": "`", "end": "`" }
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"keywords": {
|
|
55
|
-
"patterns": [
|
|
56
|
-
{ "name": "keyword.control.clpp", "match": "\\b(if|else|guard|for|in|while|switch|case|default|break|return|match|spawn|parallel|async|await|link|as|from)\\b" },
|
|
57
|
-
{ "name": "keyword.other.clpp", "match": "\\b(struct|class|namespace|using|template|typedef|enum|public|private|protected|static|const|constexpr|inline|extern|new)\\b" },
|
|
58
|
-
{ "name": "storage.modifier.clpp", "match": "\\b(observable|signal|func)\\b" }
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
"types": {
|
|
62
|
-
"patterns": [
|
|
63
|
-
{ "name": "storage.type.clpp", "match": "\\b(void|int|float|double|bool|string|auto|func|array|dictionary|map|optional|Option|Result)\\b" }
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
"constants": { "name": "constant.language.clpp", "match": "\\b(true|false|null|nullptr)\\b" },
|
|
67
|
-
"numbers": { "name": "constant.numeric.clpp", "match": "\\b\\d+(\\.\\d+)?\\b" },
|
|
68
|
-
"receiver": {
|
|
69
|
-
"patterns": [
|
|
70
|
-
{ "name": "keyword.other.receiver.clpp", "match": "@this\\b" },
|
|
71
|
-
{ "match": "(@)([A-Za-z_][A-Za-z0-9_]*)", "captures": { "1": { "name": "keyword.other.receiver.clpp" }, "2": { "name": "variable.other.property.receiver.clpp" } } }
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
"operators": {
|
|
75
|
-
"patterns": [
|
|
76
|
-
{ "name": "keyword.operator.concat.clpp", "match": "\\.:" },
|
|
77
|
-
{ "name": "keyword.operator.cleanup.clpp", "match": "~>" },
|
|
78
|
-
{ "name": "keyword.operator.scope.clpp", "match": "::" },
|
|
79
|
-
{ "name": "keyword.operator.arrow.clpp", "match": "=>" },
|
|
80
|
-
{ "name": "keyword.operator.assignment.clpp", "match": "\\+=|-=|\\*=|/=|=" }
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
"properties": {
|
|
84
|
-
"patterns": [
|
|
85
|
-
{ "match": "\\.(?![:.])([A-Za-z_][A-Za-z0-9_]*)", "captures": { "1": { "name": "variable.other.property.clpp" } } }
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"functions": { "name": "entity.name.function.clpp", "match": "\\b([A-Za-z_][A-Za-z0-9_]*)\\s*(?=\\()" }
|
|
89
|
-
}
|
|
90
|
-
}
|
package/native/bin/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|