functionalscript 0.0.460 → 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.
@@ -69,14 +69,13 @@ const cpp = ({dirname, platform}) => ({
69
69
  },
70
70
  line: [
71
71
  flat([
72
- ['clang', '-shared', '-o', output(platform)('main')],
72
+ ['clang', '-shared', '-o', output(platform)('testc')],
73
73
  flags(platform),
74
74
  [`${dirname}/cpp/main.cpp`]]
75
75
  ),
76
76
  ],
77
77
  })
78
78
 
79
-
80
79
  /** @type {Func} */
81
80
  const cs = ({dirname}) => ({
82
81
  file: {
@@ -103,4 +102,4 @@ module.exports = {
103
102
  cs,
104
103
  /** @readonly */
105
104
  rust,
106
- }
105
+ }
@@ -1,2 +1,14 @@
1
1
  #include "../../cpp/com.hpp"
2
2
  #include "_result.hpp"
3
+
4
+ #ifdef _WIN32
5
+ #define DLL_EXPORT __declspec(dllexport)
6
+ #else
7
+ #define DLL_EXPORT
8
+ #endif
9
+
10
+ DLL_EXPORT
11
+ extern "C" int c_get()
12
+ {
13
+ return 43;
14
+ }
@@ -3,6 +3,10 @@
3
3
  [DllImport("testrust")]
4
4
  static extern int get();
5
5
 
6
+ [DllImport("testc")]
7
+ static extern int c_get();
8
+
6
9
  // See https://aka.ms/new-console-template for more information
7
10
  Console.WriteLine("Hello, World!");
8
11
  Console.WriteLine(get());
12
+ Console.WriteLine(c_get());
@@ -10,6 +10,7 @@
10
10
 
11
11
  <ItemGroup>
12
12
  <None Include="../../../target/debug/*testrust.*" CopyToOutputDirectory="PreserveNewest"/>
13
+ <None Include="../../../*testc.*" CopyToOutputDirectory="PreserveNewest"/>
13
14
  </ItemGroup>
14
15
 
15
16
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.460",
3
+ "version": "0.0.461",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "module.f.cjs",
6
6
  "scripts": {