functionalscript 0.0.415 → 0.0.418

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.
@@ -13,5 +13,5 @@ jobs:
13
13
  - uses: actions/checkout@v2
14
14
  - uses: denoland/setup-deno@v1
15
15
  with:
16
- deno-version: v1.x
16
+ deno-version: v1.25.1
17
17
  - run: deno run --unstable --compat --allow-read --allow-env ./test.f.cjs
@@ -14,7 +14,7 @@ jobs:
14
14
 
15
15
  strategy:
16
16
  matrix:
17
- node-version: [14.x, 16.x, 18.x]
17
+ node-version: [16.x, 18.x]
18
18
  # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19
19
 
20
20
  steps:
@@ -14,7 +14,7 @@ jobs:
14
14
  - uses: actions/checkout@v2
15
15
  - uses: actions/setup-node@v2
16
16
  with:
17
- node-version: 14
17
+ node-version: 16
18
18
  - run: npm ci
19
19
  - run: npm test
20
20
 
@@ -27,7 +27,7 @@ jobs:
27
27
  fetch-depth: 0
28
28
  - uses: actions/setup-node@v2
29
29
  with:
30
- node-version: 14
30
+ node-version: 16
31
31
  registry-url: https://registry.npmjs.org/
32
32
  - run: npm ci
33
33
  - run: npm run version
@@ -15,6 +15,7 @@ const f = () =>
15
15
  ' {\n' +
16
16
  ' uint8_t* Start;\n' +
17
17
  ' size_t Size;\n' +
18
+ ' ::com::ref<IMy> M;\n' +
18
19
  ' };\n' +
19
20
  ' struct IMy: ::com::IUnknown\n' +
20
21
  ' {\n' +
package/com/cs/test.f.cjs CHANGED
@@ -17,6 +17,7 @@ const f = () =>
17
17
  ' {\n' +
18
18
  ' public unsafe byte* Start;\n' +
19
19
  ' public UIntPtr Size;\n' +
20
+ ' public IMy M;\n' +
20
21
  ' }\n' +
21
22
  ' [Guid("C66FB270-2D80-49AD-BB6E-88C1F90B805D")]\n' +
22
23
  ' [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\n' +
@@ -1,8 +1,154 @@
1
1
  const types = require('../types/module.f.cjs')
2
+ const { paramList } = types
2
3
  const text = require('../../text/module.f.cjs')
4
+ const object = require('../../types/object/module.f.cjs')
5
+ const list = require('../../types/list/module.f.cjs')
6
+ const { flat, map, flatMap } = list
7
+ const { entries } = Object
8
+ const { fn } = require('../../types/function/module.f.cjs')
9
+ const { join } = require('../../types/string/module.f.cjs')
3
10
 
4
- /** @type {(name: string) => (library: types.Library) => text.Block} */
5
- const rust = name => library => []
11
+ /** @type {(field: string) => string} */
12
+ const rustField = field => `pub ${field},`
13
+
14
+ const mapRustField = map(rustField)
15
+
16
+ /** @type {(b: list.Thunk<string>) => (name: string) => text.Block} */
17
+ const rustStruct = b => name => [`#[repr(C)]`, `pub struct ${name} {`, mapRustField(b), `}`]
18
+
19
+ const commaJoin = join(', ')
20
+
21
+ /** @type {(name: string) => string} */
22
+ const ref = name => `${name}::Ref`
23
+
24
+ /** @type {(name: string) => string} */
25
+ const obj = name => `&${name}::Object`
26
+
27
+ const self = ['&self']
28
+
29
+ /** @type {(p: types.Field) => string} */
30
+ const paramName = ([n]) => n
31
+
32
+ /** @type {(p: types.FieldArray) => string} */
33
+ const call = p => commaJoin(flat([['self'], map(paramName)(paramList(p))]))
34
+
35
+ /** @type {(m: types.Method) => string} */
36
+ const assign = ([n]) => `${n}: Self::${n},`
37
+
38
+ const mapAssign = map(assign)
39
+
40
+ const super_ = 'super::'
41
+
42
+ /** @type {(library: types.Library) => text.Block} */
43
+ const rust = library => {
44
+
45
+ /** @type {(p: string) => (o: (_: string) => string) => (t: types.Type) => string} */
46
+ const type = p => {
47
+ /** @type {(o: (_: string) => string) => (t: types.Type) => string} */
48
+ const f = o => t => {
49
+ if (typeof t === 'string') { return t }
50
+ if (t.length === 2) { return `*const ${f(ref)(t[1])}` }
51
+ const [id] = t
52
+ const fullId = `${p}${id}`
53
+ return library[id].interface === undefined ? fullId : o(fullId)
54
+ }
55
+ return f
56
+ }
57
+
58
+ /** @type {(p: string) => (o: (_: string) => string) => (f: types.Field) => string} */
59
+ const pf = p => o => ([name, t]) => `${name}: ${type(p)(o)(t)}`
60
+
61
+ const param = pf(super_)(obj)
62
+
63
+ const mapParam = map(param)
64
+
65
+ const mapField = map(pf('')(ref))
66
+
67
+ /** @type {(fa: types.FieldArray) => (name: string) => text.Block} */
68
+ const struct = fn(entries)
69
+ .then(mapField)
70
+ .then(rustStruct)
71
+ .result
72
+
73
+ /** @type {(first: readonly string[]) => (p: types.FieldArray) => string} */
74
+ const func = first => p => {
75
+ const result = p._
76
+ const resultStr = result === undefined ? '' : ` -> ${type(super_)(ref)(result)}`
77
+ const params = commaJoin(flat([first, mapParam(paramList(p))]))
78
+ return `(${params})${resultStr}`
79
+ }
80
+
81
+ /** @type {(m: types.Method) => string} */
82
+ const headerFn = ([n, p]) => `fn ${n}${func(self)(p)}`
83
+
84
+ /** @type {(m: types.Method) => string} */
85
+ const traitFn = m => `${headerFn(m)};`
86
+
87
+ const mapTraitFn = map(traitFn)
88
+
89
+ /** @type {(m: types.Method) => text.Block} */
90
+ const implFn = m => {
91
+ const [n, p] = m
92
+ return [
93
+ `${headerFn(m)} {`,
94
+ [`unsafe { (self.interface().${n})(${call(p)}) }`],
95
+ '}'
96
+ ]
97
+ }
98
+
99
+ const flatMapImplFn = flatMap(implFn)
100
+
101
+ /** @type {(i: types.Interface) => (name: string) => text.Block} */
102
+ const interface_ = ({ interface: i, guid }) => name => {
103
+
104
+ const this_ = ['this: &Object']
105
+
106
+ /** @type {(m: types.Method) => string} */
107
+ const virtualFn = ([n, p]) => `${n}: unsafe extern "system" fn${func(this_)(p)}`
108
+
109
+ const e = entries(i)
110
+
111
+ const nameEx = `${name}Ex`
112
+
113
+ const nameVmt = `${name}Vmt`
114
+
115
+ return [
116
+ `pub mod ${name} {`,
117
+ [
118
+ 'type Object = nanocom::Object<Interface>;',
119
+ 'type Ref = nanocom::Ref<Interface>;',
120
+ 'type Vmt = nanocom::Vmt<Interface>;',
121
+ ],
122
+ rustStruct(map(virtualFn)(e))('Interface'),
123
+ [ 'impl nanocom::Interface for Interface {',
124
+ [ `const GUID: nanocom::GUID = 0x${guid.replaceAll('-', '_')};`],
125
+ '}',
126
+ 'pub trait Ex {',
127
+ mapTraitFn(e),
128
+ '}',
129
+ 'impl Ex for Object {',
130
+ flatMapImplFn(e),
131
+ '}',
132
+ 'pub trait ClassEx: nanocom::Class<Interface = Interface>',
133
+ 'where',
134
+ [ 'nanocom::CObject<Self>: Ex,'],
135
+ '{',
136
+ [ `const INTERFACE: Interface = Interface {`,
137
+ mapAssign(e),
138
+ '};'
139
+ ],
140
+ '}',
141
+ 'impl<T: nanocom::Class<Interface = Interface>> ClassEx for T where nanocom::CObject<T>: Ex {}',
142
+ ],
143
+ '}'
144
+ ]
145
+ }
146
+
147
+ /** @type {(type: object.Entry<types.Definition>) => text.Block} */
148
+ const def = ([name, type]) => (type.interface === undefined ? struct(type.struct) : interface_(type))(name)
149
+
150
+ return flat([['#![allow(non_snake_case)]'], flatMap(def)(entries(library))])
151
+ }
6
152
 
7
153
  module.exports = {
8
154
  /** @readonly */
@@ -35,7 +35,7 @@ impl<T: Class> CObject<T> {
35
35
  };
36
36
 
37
37
  #[allow(non_snake_case)]
38
- extern "stdcall" fn QueryInterface(
38
+ extern "system" fn QueryInterface(
39
39
  this: &Object<T::Interface>,
40
40
  riid: &u128,
41
41
  ppv_object: &mut *const Object,
@@ -51,7 +51,7 @@ impl<T: Class> CObject<T> {
51
51
  }
52
52
 
53
53
  #[allow(non_snake_case)]
54
- extern "stdcall" fn AddRef(this: &Object<T::Interface>) -> u32 {
54
+ extern "system" fn AddRef(this: &Object<T::Interface>) -> u32 {
55
55
  unsafe { T::to_cobject(this) }
56
56
  .counter
57
57
  .fetch_add(1, Ordering::Relaxed)
@@ -59,7 +59,7 @@ impl<T: Class> CObject<T> {
59
59
  }
60
60
 
61
61
  #[allow(non_snake_case)]
62
- extern "stdcall" fn Release(this: &Object<T::Interface>) -> u32 {
62
+ extern "system" fn Release(this: &Object<T::Interface>) -> u32 {
63
63
  let t = unsafe { T::to_cobject(this) };
64
64
  match t.counter.fetch_sub(1, Ordering::Relaxed) {
65
65
  1 => {
@@ -3,11 +3,11 @@ use crate::{hresult::HRESULT, Object, GUID};
3
3
  #[allow(non_snake_case)]
4
4
  #[repr(C)]
5
5
  pub struct IUnknown<I: 'static> {
6
- pub QueryInterface: unsafe extern "stdcall" fn(
6
+ pub QueryInterface: unsafe extern "system" fn(
7
7
  this: &Object<I>,
8
8
  riid: &GUID,
9
9
  ppv_object: &mut *const Object,
10
10
  ) -> HRESULT,
11
- pub AddRef: unsafe extern "stdcall" fn(this: &Object<I>) -> u32,
12
- pub Release: unsafe extern "stdcall" fn(this: &Object<I>) -> u32,
11
+ pub AddRef: unsafe extern "system" fn(this: &Object<I>) -> u32,
12
+ pub Release: unsafe extern "system" fn(this: &Object<I>) -> u32,
13
13
  }
@@ -1,4 +1,8 @@
1
- use std::{cmp::Eq, fmt::{Debug, Formatter}, ops::Deref};
1
+ use std::{
2
+ cmp::Eq,
3
+ fmt::{Debug, Formatter},
4
+ ops::Deref,
5
+ };
2
6
 
3
7
  use crate::object::Object;
4
8
 
@@ -1,26 +1,25 @@
1
+ #![allow(non_snake_case)]
2
+
1
3
  // interface definition:
2
4
 
3
5
  mod library {
4
6
  use nanocom::{CObject, Class, Interface, Object, Ref, GUID};
5
7
 
6
- #[allow(non_snake_case)]
7
8
  #[repr(C)]
8
9
  pub struct IMy {
9
- pub A: unsafe extern "stdcall" fn(this: &Object<IMy>) -> Ref<IMy>,
10
- pub B: unsafe extern "stdcall" fn(this: &Object<IMy>) -> u32,
10
+ pub A: unsafe extern "system" fn(this: &Object<IMy>) -> Ref<IMy>,
11
+ pub B: unsafe extern "system" fn(this: &Object<IMy>) -> u32,
11
12
  }
12
13
 
13
14
  impl Interface for IMy {
14
15
  const GUID: GUID = 0x01234567_89AB_CDEF_0123_456789ABCDEF;
15
16
  }
16
17
 
17
- #[allow(non_snake_case)]
18
18
  pub trait IMyEx {
19
19
  fn A(&self) -> Ref<IMy>;
20
20
  fn B(&self) -> u32;
21
21
  }
22
22
 
23
- #[allow(non_snake_case)]
24
23
  impl IMyEx for Object<IMy> {
25
24
  fn A(&self) -> Ref<IMy> {
26
25
  unsafe { (self.interface().A)(self) }
@@ -42,15 +41,14 @@ mod library {
42
41
 
43
42
  impl<T: Class<Interface = IMy>> IMyVmt for T where CObject<T>: IMyEx {}
44
43
 
45
- #[allow(non_snake_case)]
46
44
  trait IMyVmtFn: Class<Interface = IMy>
47
45
  where
48
46
  CObject<Self>: IMyEx,
49
47
  {
50
- extern "stdcall" fn A(this: &Object<IMy>) -> Ref<IMy> {
48
+ extern "system" fn A(this: &Object<IMy>) -> Ref<IMy> {
51
49
  unsafe { Self::to_cobject(this) }.A()
52
50
  }
53
- extern "stdcall" fn B(this: &Object<IMy>) -> u32 {
51
+ extern "system" fn B(this: &Object<IMy>) -> u32 {
54
52
  unsafe { Self::to_cobject(this) }.B()
55
53
  }
56
54
  }
@@ -0,0 +1,196 @@
1
+ #![allow(non_snake_case)]
2
+
3
+ // interface definition:
4
+
5
+ mod library {
6
+ pub mod IMy {
7
+ pub type Object = nanocom::Object<Interface>;
8
+ pub type Ref = nanocom::Ref<Interface>;
9
+ pub type Vmt = nanocom::Vmt<Interface>;
10
+
11
+ #[repr(C)]
12
+ pub struct Interface {
13
+ pub A: unsafe extern "system" fn(this: &Object) -> Ref,
14
+ pub B: unsafe extern "system" fn(this: &Object) -> u32,
15
+ }
16
+
17
+ impl nanocom::Interface for Interface {
18
+ const GUID: nanocom::GUID = 0x01234567_89AB_CDEF_0123_456789ABCDEF;
19
+ }
20
+
21
+ pub trait Ex {
22
+ fn A(&self) -> Ref;
23
+ fn B(&self) -> u32;
24
+ }
25
+
26
+ impl Ex for Object {
27
+ fn A(&self) -> Ref {
28
+ unsafe { (self.interface().A)(self) }
29
+ }
30
+ fn B(&self) -> u32 {
31
+ unsafe { (self.interface().B)(self) }
32
+ }
33
+ }
34
+
35
+ pub trait ClassEx: nanocom::Class<Interface = Interface>
36
+ where
37
+ nanocom::CObject<Self>: Ex,
38
+ {
39
+ const INTERFACE: Interface = Interface {
40
+ A: Self::A,
41
+ B: Self::B,
42
+ };
43
+ }
44
+
45
+ impl<T: nanocom::Class<Interface = Interface>> ClassEx for T where nanocom::CObject<T>: Ex {}
46
+
47
+ trait PrivateClassEx: nanocom::Class<Interface = Interface>
48
+ where
49
+ nanocom::CObject<Self>: Ex,
50
+ {
51
+ extern "system" fn A(this: &Object) -> Ref {
52
+ unsafe { Self::to_cobject(this) }.A()
53
+ }
54
+ extern "system" fn B(this: &Object) -> u32 {
55
+ unsafe { Self::to_cobject(this) }.B()
56
+ }
57
+ }
58
+
59
+ impl<T: nanocom::Class<Interface = Interface>> PrivateClassEx for T where nanocom::CObject<T>: Ex {}
60
+ }
61
+ }
62
+
63
+ // interface implementation
64
+ mod number {
65
+ use nanocom::{CObject, Vmt};
66
+
67
+ use crate::library::IMy::ClassEx;
68
+
69
+ use super::library::IMy;
70
+
71
+ pub struct X(pub u32);
72
+
73
+ impl nanocom::Class for X {
74
+ type Interface = IMy::Interface;
75
+ fn static_vmt() -> &'static Vmt<Self::Interface> {
76
+ static V: IMy::Vmt = Vmt {
77
+ iunknown: X::IUNKNOWN,
78
+ interface: X::INTERFACE,
79
+ };
80
+ &V
81
+ }
82
+ }
83
+
84
+ impl IMy::Ex for CObject<X> {
85
+ fn A(&self) -> IMy::Ref {
86
+ self.to_interface().into()
87
+ }
88
+ fn B(&self) -> u32 {
89
+ self.value.0
90
+ }
91
+ }
92
+ }
93
+
94
+ mod use_number {
95
+ use nanocom::Class;
96
+
97
+ use crate::library::IMy::Ex;
98
+
99
+ use super::number::X;
100
+
101
+ #[test]
102
+ fn test() {
103
+ let a = X(42).cobject_new();
104
+ let a1 = a.A();
105
+ assert_eq!(a, a1);
106
+ assert_eq!(a.B(), 42);
107
+ let b = X(43).cobject_new();
108
+ assert_ne!(a, b);
109
+ assert_eq!(b.B(), 43);
110
+ }
111
+ }
112
+
113
+ mod destructor {
114
+ use std::{
115
+ rc::Rc,
116
+ sync::atomic::{AtomicU32, Ordering},
117
+ };
118
+
119
+ use nanocom::{CObject, Vmt};
120
+
121
+ use crate::library::IMy::ClassEx;
122
+
123
+ use super::library::IMy;
124
+
125
+ pub struct X {
126
+ p: Rc<AtomicU32>,
127
+ }
128
+
129
+ impl X {
130
+ pub fn new(p: Rc<AtomicU32>) -> Self {
131
+ p.fetch_add(1, Ordering::Relaxed);
132
+ Self { p }
133
+ }
134
+ }
135
+
136
+ impl Drop for X {
137
+ fn drop(&mut self) {
138
+ self.p.fetch_sub(1, Ordering::Relaxed);
139
+ }
140
+ }
141
+
142
+ impl nanocom::Class for X {
143
+ type Interface = IMy::Interface;
144
+ fn static_vmt() -> &'static Vmt<Self::Interface> {
145
+ static V: IMy::Vmt = Vmt {
146
+ iunknown: X::IUNKNOWN,
147
+ interface: X::INTERFACE,
148
+ };
149
+ &V
150
+ }
151
+ }
152
+
153
+ impl IMy::Ex for CObject<X> {
154
+ fn A(&self) -> IMy::Ref {
155
+ self.to_interface().into()
156
+ }
157
+ fn B(&self) -> u32 {
158
+ self.value.p.load(Ordering::Relaxed)
159
+ }
160
+ }
161
+ }
162
+
163
+ mod use_destructor {
164
+ use std::{
165
+ rc::Rc,
166
+ sync::atomic::{AtomicU32, Ordering},
167
+ };
168
+
169
+ use nanocom::Class;
170
+
171
+ use crate::library::IMy::Ex;
172
+
173
+ use super::destructor::X;
174
+
175
+ #[test]
176
+ fn test() {
177
+ let p = Rc::new(AtomicU32::default());
178
+ {
179
+ assert_eq!(p.load(Ordering::Relaxed), 0);
180
+ let a = X::new(p.clone()).cobject_new();
181
+ assert_eq!(p.load(Ordering::Relaxed), 1);
182
+ let a1 = a.A();
183
+ assert_eq!(p.load(Ordering::Relaxed), 1);
184
+ assert_eq!(a, a1);
185
+ assert_eq!(a.B(), 1);
186
+ {
187
+ let b = X::new(p.clone()).cobject_new();
188
+ assert_eq!(p.load(Ordering::Relaxed), 2);
189
+ assert_ne!(a, b);
190
+ assert_eq!(b.B(), 2);
191
+ }
192
+ assert_eq!(p.load(Ordering::Relaxed), 1);
193
+ }
194
+ assert_eq!(p.load(Ordering::Relaxed), 0);
195
+ }
196
+ }
@@ -4,8 +4,75 @@ const { join } = require('../../types/string/module.f.cjs')
4
4
  const library = require('../types/test.f.cjs')
5
5
 
6
6
  {
7
- const r = join('\n')(flat(' ')(rust('My')(library)))
8
- if (r !== '') { throw r }
7
+ const e =
8
+ '#![allow(non_snake_case)]\n' +
9
+ '#[repr(C)]\n' +
10
+ 'pub struct Slice {\n' +
11
+ ' pub Start: *const u8,\n' +
12
+ ' pub Size: usize,\n' +
13
+ ' pub M: IMy::Ref,\n' +
14
+ '}\n' +
15
+ 'pub mod IMy {\n' +
16
+ ' type Object = nanocom::Object<Interface>;\n' +
17
+ ' type Ref = nanocom::Ref<Interface>;\n' +
18
+ ' type Vmt = nanocom::Vmt<Interface>;\n' +
19
+ ' #[repr(C)]\n' +
20
+ ' pub struct Interface {\n' +
21
+ ' pub GetSlice: unsafe extern "system" fn(this: &Object) -> super::Slice,\n' +
22
+ ' pub SetSlice: unsafe extern "system" fn(this: &Object, slice: super::Slice),\n' +
23
+ ' pub GetUnsafe: unsafe extern "system" fn(this: &Object) -> *const bool,\n' +
24
+ ' pub SetUnsafe: unsafe extern "system" fn(this: &Object, p: *const super::Slice, size: u32),\n' +
25
+ ' pub Some: unsafe extern "system" fn(this: &Object, p: &super::IMy::Object) -> bool,\n' +
26
+ ' pub GetIMy: unsafe extern "system" fn(this: &Object) -> super::IMy::Ref,\n' +
27
+ ' }\n' +
28
+ ' impl nanocom::Interface for Interface {\n' +
29
+ ' const GUID: nanocom::GUID = 0xC66FB270_2D80_49AD_BB6E_88C1F90B805D;\n' +
30
+ ' }\n' +
31
+ ' pub trait Ex {\n' +
32
+ ' fn GetSlice(&self) -> super::Slice;\n' +
33
+ ' fn SetSlice(&self, slice: super::Slice);\n' +
34
+ ' fn GetUnsafe(&self) -> *const bool;\n' +
35
+ ' fn SetUnsafe(&self, p: *const super::Slice, size: u32);\n' +
36
+ ' fn Some(&self, p: &super::IMy::Object) -> bool;\n' +
37
+ ' fn GetIMy(&self) -> super::IMy::Ref;\n' +
38
+ ' }\n' +
39
+ ' impl Ex for Object {\n' +
40
+ ' fn GetSlice(&self) -> super::Slice {\n' +
41
+ ' unsafe { (self.interface().GetSlice)(self) }\n' +
42
+ ' }\n' +
43
+ ' fn SetSlice(&self, slice: super::Slice) {\n' +
44
+ ' unsafe { (self.interface().SetSlice)(self, slice) }\n' +
45
+ ' }\n' +
46
+ ' fn GetUnsafe(&self) -> *const bool {\n' +
47
+ ' unsafe { (self.interface().GetUnsafe)(self) }\n' +
48
+ ' }\n' +
49
+ ' fn SetUnsafe(&self, p: *const super::Slice, size: u32) {\n' +
50
+ ' unsafe { (self.interface().SetUnsafe)(self, p, size) }\n' +
51
+ ' }\n' +
52
+ ' fn Some(&self, p: &super::IMy::Object) -> bool {\n' +
53
+ ' unsafe { (self.interface().Some)(self, p) }\n' +
54
+ ' }\n' +
55
+ ' fn GetIMy(&self) -> super::IMy::Ref {\n' +
56
+ ' unsafe { (self.interface().GetIMy)(self) }\n' +
57
+ ' }\n' +
58
+ ' }\n' +
59
+ ' pub trait ClassEx: nanocom::Class<Interface = Interface>\n' +
60
+ ' where\n' +
61
+ ' nanocom::CObject<Self>: Ex,\n' +
62
+ ' {\n' +
63
+ ' const INTERFACE: Interface = Interface {\n' +
64
+ ' GetSlice: Self::GetSlice,\n' +
65
+ ' SetSlice: Self::SetSlice,\n' +
66
+ ' GetUnsafe: Self::GetUnsafe,\n' +
67
+ ' SetUnsafe: Self::SetUnsafe,\n' +
68
+ ' Some: Self::Some,\n' +
69
+ ' GetIMy: Self::GetIMy,\n' +
70
+ ' };\n' +
71
+ ' }\n' +
72
+ ' impl<T: nanocom::Class<Interface = Interface>> ClassEx for T where nanocom::CObject<T>: Ex {}\n' +
73
+ '}'
74
+ const r = join('\n')(flat(' ')(rust(library)))
75
+ if (r !== e) { throw [e, r] }
9
76
  }
10
77
 
11
78
  module.exports = {}
@@ -6,6 +6,7 @@ module.exports = {
6
6
  struct: {
7
7
  Start: ['*', 'u8'],
8
8
  Size: 'usize',
9
+ M: ['IMy'],
9
10
  },
10
11
  },
11
12
  IMy: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.415",
3
+ "version": "0.0.418",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "module.f.cjs",
6
6
  "scripts": {
package/tsconfig.json CHANGED
@@ -96,5 +96,6 @@
96
96
  /* Completeness */
97
97
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
98
98
  "skipLibCheck": true /* Skip type checking all .d.ts files. */
99
- }
99
+ },
100
+ "exclude": ["target"]
100
101
  }