functionalscript 0.0.459 → 0.0.461
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/com/test/build.cjs +1 -1
- package/com/test/build.f.cjs +16 -18
- package/com/test/cpp/main.cpp +12 -0
- package/com/test/cs/Program.cs +11 -1
- package/com/test/cs/cs.csproj +5 -0
- package/com/test/rust/src/lib.rs +3 -0
- package/package.json +1 -1
package/com/test/build.cjs
CHANGED
package/com/test/build.f.cjs
CHANGED
|
@@ -62,22 +62,19 @@ const output = platform => name => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/** @type {Func} */
|
|
65
|
-
const cpp = ({dirname, platform}) => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
79
|
-
}
|
|
80
|
-
}
|
|
65
|
+
const cpp = ({dirname, platform}) => ({
|
|
66
|
+
file: {
|
|
67
|
+
name: `${dirname}/cpp/_result.hpp`,
|
|
68
|
+
content: cppContent,
|
|
69
|
+
},
|
|
70
|
+
line: [
|
|
71
|
+
flat([
|
|
72
|
+
['clang', '-shared', '-o', output(platform)('testc')],
|
|
73
|
+
flags(platform),
|
|
74
|
+
[`${dirname}/cpp/main.cpp`]]
|
|
75
|
+
),
|
|
76
|
+
],
|
|
77
|
+
})
|
|
81
78
|
|
|
82
79
|
/** @type {Func} */
|
|
83
80
|
const cs = ({dirname}) => ({
|
|
@@ -85,7 +82,8 @@ const cs = ({dirname}) => ({
|
|
|
85
82
|
name: `${dirname}/cs/_result.cs`,
|
|
86
83
|
content: csContent,
|
|
87
84
|
},
|
|
88
|
-
line: [
|
|
85
|
+
line: [
|
|
86
|
+
['dotnet', 'run', '--project', `${dirname}/cs/cs.csproj`]],
|
|
89
87
|
})
|
|
90
88
|
|
|
91
89
|
/** @type {Func} */
|
|
@@ -104,4 +102,4 @@ module.exports = {
|
|
|
104
102
|
cs,
|
|
105
103
|
/** @readonly */
|
|
106
104
|
rust,
|
|
107
|
-
}
|
|
105
|
+
}
|
package/com/test/cpp/main.cpp
CHANGED
package/com/test/cs/Program.cs
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
using System.Runtime.InteropServices;
|
|
2
|
+
|
|
3
|
+
[DllImport("testrust")]
|
|
4
|
+
static extern int get();
|
|
5
|
+
|
|
6
|
+
[DllImport("testc")]
|
|
7
|
+
static extern int c_get();
|
|
8
|
+
|
|
9
|
+
// See https://aka.ms/new-console-template for more information
|
|
2
10
|
Console.WriteLine("Hello, World!");
|
|
11
|
+
Console.WriteLine(get());
|
|
12
|
+
Console.WriteLine(c_get());
|
package/com/test/cs/cs.csproj
CHANGED
|
@@ -8,4 +8,9 @@
|
|
|
8
8
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
|
9
9
|
</PropertyGroup>
|
|
10
10
|
|
|
11
|
+
<ItemGroup>
|
|
12
|
+
<None Include="../../../target/debug/*testrust.*" CopyToOutputDirectory="PreserveNewest"/>
|
|
13
|
+
<None Include="../../../*testc.*" CopyToOutputDirectory="PreserveNewest"/>
|
|
14
|
+
</ItemGroup>
|
|
15
|
+
|
|
11
16
|
</Project>
|
package/com/test/rust/src/lib.rs
CHANGED