@devanshhq/indica 0.1.0

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.
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ matrix:
15
+ os: [ubuntu-latest, macos-latest]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: dtolnay/rust-toolchain@stable
19
+ - uses: Swatinem/rust-cache@v2
20
+ - run: cargo test --release
21
+ - run: cargo clippy -- -D warnings
22
+
23
+ format:
24
+ name: Format
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: dtolnay/rust-toolchain@stable
29
+ with:
30
+ components: rustfmt
31
+ - run: cargo fmt --check
package/Cargo.lock ADDED
@@ -0,0 +1,354 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "bitflags"
7
+ version = "2.11.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.4"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
16
+
17
+ [[package]]
18
+ name = "convert_case"
19
+ version = "0.11.0"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49"
22
+ dependencies = [
23
+ "unicode-segmentation",
24
+ ]
25
+
26
+ [[package]]
27
+ name = "crossbeam-deque"
28
+ version = "0.8.6"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
31
+ dependencies = [
32
+ "crossbeam-epoch",
33
+ "crossbeam-utils",
34
+ ]
35
+
36
+ [[package]]
37
+ name = "crossbeam-epoch"
38
+ version = "0.9.18"
39
+ source = "registry+https://github.com/rust-lang/crates.io-index"
40
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
41
+ dependencies = [
42
+ "crossbeam-utils",
43
+ ]
44
+
45
+ [[package]]
46
+ name = "crossbeam-utils"
47
+ version = "0.8.21"
48
+ source = "registry+https://github.com/rust-lang/crates.io-index"
49
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
50
+
51
+ [[package]]
52
+ name = "ctor"
53
+ version = "0.8.0"
54
+ source = "registry+https://github.com/rust-lang/crates.io-index"
55
+ checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98"
56
+ dependencies = [
57
+ "ctor-proc-macro",
58
+ "dtor",
59
+ ]
60
+
61
+ [[package]]
62
+ name = "ctor-proc-macro"
63
+ version = "0.0.7"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
66
+
67
+ [[package]]
68
+ name = "dtor"
69
+ version = "0.3.0"
70
+ source = "registry+https://github.com/rust-lang/crates.io-index"
71
+ checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4"
72
+ dependencies = [
73
+ "dtor-proc-macro",
74
+ ]
75
+
76
+ [[package]]
77
+ name = "dtor-proc-macro"
78
+ version = "0.0.6"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"
81
+
82
+ [[package]]
83
+ name = "either"
84
+ version = "1.15.0"
85
+ source = "registry+https://github.com/rust-lang/crates.io-index"
86
+ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
87
+
88
+ [[package]]
89
+ name = "futures"
90
+ version = "0.3.32"
91
+ source = "registry+https://github.com/rust-lang/crates.io-index"
92
+ checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
93
+ dependencies = [
94
+ "futures-channel",
95
+ "futures-core",
96
+ "futures-executor",
97
+ "futures-io",
98
+ "futures-sink",
99
+ "futures-task",
100
+ "futures-util",
101
+ ]
102
+
103
+ [[package]]
104
+ name = "futures-channel"
105
+ version = "0.3.32"
106
+ source = "registry+https://github.com/rust-lang/crates.io-index"
107
+ checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
108
+ dependencies = [
109
+ "futures-core",
110
+ "futures-sink",
111
+ ]
112
+
113
+ [[package]]
114
+ name = "futures-core"
115
+ version = "0.3.32"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
118
+
119
+ [[package]]
120
+ name = "futures-executor"
121
+ version = "0.3.32"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
124
+ dependencies = [
125
+ "futures-core",
126
+ "futures-task",
127
+ "futures-util",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "futures-io"
132
+ version = "0.3.32"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
135
+
136
+ [[package]]
137
+ name = "futures-macro"
138
+ version = "0.3.32"
139
+ source = "registry+https://github.com/rust-lang/crates.io-index"
140
+ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
141
+ dependencies = [
142
+ "proc-macro2",
143
+ "quote",
144
+ "syn",
145
+ ]
146
+
147
+ [[package]]
148
+ name = "futures-sink"
149
+ version = "0.3.32"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
152
+
153
+ [[package]]
154
+ name = "futures-task"
155
+ version = "0.3.32"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
158
+
159
+ [[package]]
160
+ name = "futures-util"
161
+ version = "0.3.32"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
164
+ dependencies = [
165
+ "futures-channel",
166
+ "futures-core",
167
+ "futures-io",
168
+ "futures-macro",
169
+ "futures-sink",
170
+ "futures-task",
171
+ "memchr",
172
+ "pin-project-lite",
173
+ "slab",
174
+ ]
175
+
176
+ [[package]]
177
+ name = "indica"
178
+ version = "0.1.0"
179
+ dependencies = [
180
+ "napi",
181
+ "napi-build",
182
+ "napi-derive",
183
+ "rayon",
184
+ ]
185
+
186
+ [[package]]
187
+ name = "libloading"
188
+ version = "0.9.0"
189
+ source = "registry+https://github.com/rust-lang/crates.io-index"
190
+ checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
191
+ dependencies = [
192
+ "cfg-if",
193
+ "windows-link",
194
+ ]
195
+
196
+ [[package]]
197
+ name = "memchr"
198
+ version = "2.8.0"
199
+ source = "registry+https://github.com/rust-lang/crates.io-index"
200
+ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
201
+
202
+ [[package]]
203
+ name = "napi"
204
+ version = "3.8.4"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "fb7848c221fb7bb789e02f01875287ebb1e078b92a6566a34de01ef8806e7c2b"
207
+ dependencies = [
208
+ "bitflags",
209
+ "ctor",
210
+ "futures",
211
+ "napi-build",
212
+ "napi-sys",
213
+ "nohash-hasher",
214
+ "rustc-hash",
215
+ ]
216
+
217
+ [[package]]
218
+ name = "napi-build"
219
+ version = "2.3.1"
220
+ source = "registry+https://github.com/rust-lang/crates.io-index"
221
+ checksum = "d376940fd5b723c6893cd1ee3f33abbfd86acb1cd1ec079f3ab04a2a3bc4d3b1"
222
+
223
+ [[package]]
224
+ name = "napi-derive"
225
+ version = "3.5.3"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "60867ff9a6f76e82350e0c3420cb0736f5866091b61d7d8a024baa54b0ec17dd"
228
+ dependencies = [
229
+ "convert_case",
230
+ "ctor",
231
+ "napi-derive-backend",
232
+ "proc-macro2",
233
+ "quote",
234
+ "syn",
235
+ ]
236
+
237
+ [[package]]
238
+ name = "napi-derive-backend"
239
+ version = "5.0.2"
240
+ source = "registry+https://github.com/rust-lang/crates.io-index"
241
+ checksum = "f0864cf6a82e2cfb69067374b64c9253d7e910e5b34db833ed7495dda56ccb18"
242
+ dependencies = [
243
+ "convert_case",
244
+ "proc-macro2",
245
+ "quote",
246
+ "semver",
247
+ "syn",
248
+ ]
249
+
250
+ [[package]]
251
+ name = "napi-sys"
252
+ version = "3.2.1"
253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
254
+ checksum = "8eb602b84d7c1edae45e50bbf1374696548f36ae179dfa667f577e384bb90c2b"
255
+ dependencies = [
256
+ "libloading",
257
+ ]
258
+
259
+ [[package]]
260
+ name = "nohash-hasher"
261
+ version = "0.2.0"
262
+ source = "registry+https://github.com/rust-lang/crates.io-index"
263
+ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
264
+
265
+ [[package]]
266
+ name = "pin-project-lite"
267
+ version = "0.2.17"
268
+ source = "registry+https://github.com/rust-lang/crates.io-index"
269
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
270
+
271
+ [[package]]
272
+ name = "proc-macro2"
273
+ version = "1.0.106"
274
+ source = "registry+https://github.com/rust-lang/crates.io-index"
275
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
276
+ dependencies = [
277
+ "unicode-ident",
278
+ ]
279
+
280
+ [[package]]
281
+ name = "quote"
282
+ version = "1.0.45"
283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
284
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
285
+ dependencies = [
286
+ "proc-macro2",
287
+ ]
288
+
289
+ [[package]]
290
+ name = "rayon"
291
+ version = "1.11.0"
292
+ source = "registry+https://github.com/rust-lang/crates.io-index"
293
+ checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
294
+ dependencies = [
295
+ "either",
296
+ "rayon-core",
297
+ ]
298
+
299
+ [[package]]
300
+ name = "rayon-core"
301
+ version = "1.13.0"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
304
+ dependencies = [
305
+ "crossbeam-deque",
306
+ "crossbeam-utils",
307
+ ]
308
+
309
+ [[package]]
310
+ name = "rustc-hash"
311
+ version = "2.1.2"
312
+ source = "registry+https://github.com/rust-lang/crates.io-index"
313
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
314
+
315
+ [[package]]
316
+ name = "semver"
317
+ version = "1.0.28"
318
+ source = "registry+https://github.com/rust-lang/crates.io-index"
319
+ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
320
+
321
+ [[package]]
322
+ name = "slab"
323
+ version = "0.4.12"
324
+ source = "registry+https://github.com/rust-lang/crates.io-index"
325
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
326
+
327
+ [[package]]
328
+ name = "syn"
329
+ version = "2.0.117"
330
+ source = "registry+https://github.com/rust-lang/crates.io-index"
331
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
332
+ dependencies = [
333
+ "proc-macro2",
334
+ "quote",
335
+ "unicode-ident",
336
+ ]
337
+
338
+ [[package]]
339
+ name = "unicode-ident"
340
+ version = "1.0.24"
341
+ source = "registry+https://github.com/rust-lang/crates.io-index"
342
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
343
+
344
+ [[package]]
345
+ name = "unicode-segmentation"
346
+ version = "1.13.2"
347
+ source = "registry+https://github.com/rust-lang/crates.io-index"
348
+ checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c"
349
+
350
+ [[package]]
351
+ name = "windows-link"
352
+ version = "0.2.1"
353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
354
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
package/Cargo.toml ADDED
@@ -0,0 +1,29 @@
1
+ [package]
2
+ name = "indica"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+ description = "Fast technical analysis indicators for stock markets — SMA, EMA, RSI, MACD, Bollinger Bands, ATR, and more"
6
+ license = "MIT"
7
+ repository = "https://github.com/Devansh-365/indica"
8
+ homepage = "https://github.com/Devansh-365/indica"
9
+ documentation = "https://docs.rs/indica"
10
+ readme = "README.md"
11
+ keywords = ["trading", "technical-analysis", "indicators", "finance", "stocks"]
12
+ categories = ["finance", "mathematics"]
13
+ authors = ["Devansh Tiwari"]
14
+
15
+ [lib]
16
+ crate-type = ["cdylib", "lib"]
17
+
18
+ [dependencies]
19
+ napi = { version = "3", features = ["napi4"] }
20
+ napi-derive = "3"
21
+ rayon = "1.11"
22
+
23
+ [build-dependencies]
24
+ napi-build = "2"
25
+
26
+ [profile.release]
27
+ lto = true
28
+ strip = true
29
+ codegen-units = 1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Devansh Tiwari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.