NodeScript 1.2.2
dotnet add package NodeScript --version 1.2.2
NuGet\Install-Package NodeScript -Version 1.2.2
<PackageReference Include="NodeScript" Version="1.2.2" />
<PackageVersion Include="NodeScript" Version="1.2.2" />
<PackageReference Include="NodeScript" />
paket add NodeScript --version 1.2.2
#r "nuget: NodeScript, 1.2.2"
#:package NodeScript@1.2.2
#addin nuget:?package=NodeScript&version=1.2.2
#tool nuget:?package=NodeScript&version=1.2.2
NodeScript
NodeScript is a rudimentary programming language designed to function on 'nodes', intended for use in puzzle games. Find more details here
Nodes
- Input nodes will continuously attempt to send the next line. It has only one output.
- Regular nodes can take in one string at a time, process it and send it to a set number of outputs. Each node can store a single string in
mem.memis the only variable which will persist between executions. - Combiner nodes can merge multiple inputs into one output. It offers no options to choose which string goes through first, picking whatever comes first.
- Output nodes will consume the lines sent to it, storing it in a string.
Features
- Basic arithmetic and boolean logic
- Variables - All variables are global in scope
- Indexing
- Element_of:
v[i] - Slice:
v[i:j]
- Element_of:
- Basic control flow (if-else)
- Native functions for things like:
- String manipulation
- Data conversion and parsing
- Dynamic typing between:
- string
- string[]
- int
- bool
Notably, there are NO loops within the scripting itself. No while. No for. Execution will occur line by line and will only start when a node receives an input string to be processed.
Syntax
Every line contains a single statement. All statements will start with a relevant keyword for the operation.
- SET: Sets a variable to a certain value. Variables do not need to be declared. Syntax:
SET <variable_name>, <expression> - PRINT: Sends a string to a specific output node, denoted by an index. Syntax:
PRINT <output_idx>, <expression> - RETURN: Ends the program (until the next input comes). Syntax:
RETURN - IF: Executes the following code if the given expression is true. Syntax
IF <expression> - ELSE: Executes the following code if the previous if statement was false. Syntax
ELSE - ENDIF: Marks the end of the IF clause. Either ends the IF code section or the ELSE code section. Only one is needed per IF/ELSE statement. Syntax
ENDIF - NOP: Does nothing. Helpful for synchronizing the timing of multiple nodes. Syntax
NOP
Benchmarks
NodeScriptBenchmark measures each phase of the compile pipeline (tokenize/parse, optimize/validate/compile),
cold vs. warm execution, Reset, and complete graph runs across several representative workloads
(straight-line arithmetic, branch-heavy code, native calls, string/array operations, compile errors, and
runtime errors, each in tiny/medium/max sizes) and graph shapes (linear, fan-out, fan-in, disconnected, and
cycle). All benchmark inputs are deterministic and checked into NodeScriptBenchmark/TestData. Results report
mean/median, throughput, allocated bytes and GC collections via MemoryDiagnoser, alongside the host runtime,
architecture and GC settings that BenchmarkDotNet records automatically. A baseline run is recorded in
NodeScriptBenchmark/Baseline/README.md.
- CI-safe subset (fast, used by the Benchmark workflow):
dotnet run -c Release --project ./NodeScriptBenchmark - Full/local run (more iterations, statistically robust):
dotnet run -c Release --project ./NodeScriptBenchmark -- --job Medium - A subset of benchmarks:
dotnet run -c Release --project ./NodeScriptBenchmark -- --filter *PipelineBenchmarks*
Development and CI details are documented in the wiki.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.2 | 82 | 8/18/2026 |
| 1.2.1 | 74 | 8/13/2026 |
| 1.2.0 | 207 | 2/22/2025 |
| 1.1.6 | 133 | 2/22/2025 |
| 1.1.5 | 134 | 2/7/2025 |
| 1.1.4 | 151 | 9/2/2024 |
| 1.1.3 | 135 | 9/2/2024 |
| 1.1.2 | 185 | 8/31/2024 |
| 1.1.1 | 140 | 8/30/2024 |
| 1.1.0 | 144 | 8/28/2024 |
| 1.0.4 | 152 | 8/27/2024 |
| 1.0.3 | 143 | 8/26/2024 |
| 1.0.2 | 153 | 8/25/2024 |
| 1.0.1 | 161 | 8/24/2024 |
| 1.0.0 | 181 | 8/24/2024 |
Optimizations