@flowscripter/template-bun-rust-library 1.0.26 → 1.1.1

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.
@@ -8,6 +8,7 @@ permissions:
8
8
  pull-requests: write
9
9
  id-token: write
10
10
  pages: write
11
+ packages: write
11
12
  jobs:
12
13
  call-release-bun-rust-library:
13
14
  uses: flowscripter/.github/.github/workflows/release-bun-rust-library.yml@v1
package/Cargo.lock CHANGED
@@ -4,13 +4,13 @@ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "flowscripter_template_bun_rust_library"
7
- version = "1.0.26"
7
+ version = "1.1.1"
8
8
  dependencies = [
9
9
  "flowscripter_template_rust_library",
10
10
  ]
11
11
 
12
12
  [[package]]
13
13
  name = "flowscripter_template_rust_library"
14
- version = "1.1.10"
14
+ version = "1.1.12"
15
15
  source = "registry+https://github.com/rust-lang/crates.io-index"
16
- checksum = "976ac733ec768cafc5771dd98b6a08a0551dc0f7358ac0df2d40eb091f3ee977"
16
+ checksum = "efde44ad50aba46f123ab73240f242bdc47de1ae88ce4ef6765aeadda9564071"
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "flowscripter_template_bun_rust_library"
3
- version ="1.0.26"
3
+ version ="1.1.1"
4
4
  edition = "2021"
5
5
  description = "Project template for a Rust library with Bun FFI bindings."
6
6
  homepage = "https://github.com/flowscripter"
@@ -9,7 +9,7 @@ repository = "https://github.com/flowscripter/template-bun-rust-library"
9
9
  exclude = [".github/"]
10
10
 
11
11
  [lib]
12
- crate-type = ["cdylib","lib"]
12
+ crate-type = ["cdylib", "lib"]
13
13
 
14
14
  [dependencies]
15
- flowscripter_template_rust_library = "1.1.10"
15
+ flowscripter_template_rust_library = "1.1.12"
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![version](https://img.shields.io/github/v/release/flowscripter/template-bun-rust-library?sort=semver)](https://github.com/flowscripter/template-bun-rust-library/releases)
4
4
  [![build](https://img.shields.io/github/actions/workflow/status/flowscripter/template-bun-rust-library/release-bun-rust-library.yml)](https://github.com/flowscripter/template-bun-rust-library/actions/workflows/release-bun-rust-library.yml)
5
+ [![docs](https://img.shields.io/badge/docs-API-blue)](https://flowscripter.github.io/template-bun-rust-library/index.html)
6
+ [![rust doc](https://img.shields.io/docsrs/flowscripter_template_bun_rust_library)](https://docs.rs/flowscripter_template_bun_rust_library)
5
7
  [![coverage](https://codecov.io/gh/flowscripter/template-bun-rust-library/branch/main/graph/badge.svg?token=D4ISqIOY1p)](https://codecov.io/gh/flowscripter/template-bun-rust-library)
6
8
  [![license: MIT](https://img.shields.io/github/license/flowscripter/template-bun-rust-library)](https://github.com/flowscripter/template-bun-rust-library/blob/main/LICENSE)
7
9
 
@@ -39,20 +41,17 @@ Test:
39
41
 
40
42
  `cargo build --release && bun test`
41
43
 
42
- **NOTE**: The following tasks use Deno as it excels at these and Bun does not
43
- currently provide such functionality:
44
-
45
44
  Format:
46
45
 
47
- `deno fmt`
46
+ `bunx oxfmt`
48
47
 
49
48
  Lint:
50
49
 
51
- `cargo fmt && deno lint index.ts src/ tests/`
50
+ `cargo fmt && bunx oxlint index.ts src/ tests/`
52
51
 
53
52
  Generate HTML API Documentation:
54
53
 
55
- `deno doc --html --name=template-bun-rust-library index.ts`
54
+ `bunx typedoc --readme none index.ts`
56
55
 
57
56
  ## Documentation
58
57
 
package/bun.lock CHANGED
@@ -1,26 +1,109 @@
1
1
  {
2
2
  "lockfileVersion": 1,
3
+ "configVersion": 0,
3
4
  "workspaces": {
4
5
  "": {
5
6
  "name": "@flowscripter/template-bun-rust-library",
6
7
  "devDependencies": {
7
- "@types/bun": "^1.2.5",
8
+ "@types/bun": "^1.3.14",
9
+ "oxfmt": "0.54.0",
10
+ "oxlint": "1.69.0",
8
11
  },
9
12
  "peerDependencies": {
10
- "typescript": "^5.8.2",
13
+ "typescript": "^6.0.3",
11
14
  },
12
15
  },
13
16
  },
14
17
  "packages": {
15
- "@types/bun": ["@types/bun@1.2.5", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="],
18
+ "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.54.0", "", { "os": "android", "cpu": "arm" }, "sha512-NAtpl/SiaeU103e7/OmZw0MvUnsUUopW7hEm/ecegJg7YM0skQaA0IXEZoyTV6NUdiNPupdIUreRqUZTShbn/g=="],
19
+
20
+ "@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.54.0", "", { "os": "android", "cpu": "arm64" }, "sha512-B4VZfBUlKK1rmMChsssNZbkZjE8+FzG3avMjGgMDwbGxXRoXkoeXiAZ+78Oa+eyDPHvDCiUb4zH/vmCOUSafLQ=="],
21
+
22
+ "@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.54.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-i02vF75b+ePsQP3tHqSxVYI5S6b8X/xqdPu7/mDHXtpgXLTYXi3jJmfHU0j+dnZZDKaYTx/ioCK7QYJmtiJR2g=="],
23
+
24
+ "@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.54.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-8VMFvGvooXj7mswkbrhdVZ2/sgiDaBzWpkkbtO+qGDLV4EfJd67nQadHkQC0ZNbaWA9ajXfqI6i7PZLIeDzxEQ=="],
25
+
26
+ "@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.54.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-0cRHnp43WN1Jrc5s0BdbdKgR1XirdvHy7TAFi3JEsoEVQVJxTXMbpVd76sxXlgRswNMDhVFSJw+y7Eb8mEavFQ=="],
27
+
28
+ "@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.54.0", "", { "os": "linux", "cpu": "arm" }, "sha512-JyQAk3hK/OEtup7Rw6kZwfdzbKqTVD5jXXb8Xpfay29suwZyfBDMVW/bj4RqEPySYWc6zCp198pOluf8n5uYzg=="],
29
+
30
+ "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.54.0", "", { "os": "linux", "cpu": "arm" }, "sha512-qnvLatTpM8vtvjOfcckBOzJjk+n6ce/wwpP8OFeUrD5aNLYcKyWAitwj+Rk3PK9jGanbZvKsJnv14JGQ6XqFdw=="],
31
+
32
+ "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.54.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-SMkhnCzIYZYDk9vw3W/80eeYKmrMpGF0Giuxt4HruFlCH7jEtnPeb3SdQKMfgYi/dgtaf+hZAb5XWPYnxqCQ3w=="],
33
+
34
+ "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.54.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-QrwJlBFFKnxOd95TAaszpMbZBLzMoYMpGaQTZF8oibacnF5rv8l12IhILhQRPmksWiBqg0YSe2Mnl7ayeJAHSA=="],
35
+
36
+ "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.54.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-WILatiol/TUHTlhod7R09+7Az/XlhKwmY1MHfLZNmewltPWNN/EwxP2rQSHahibZ/cB8gmckEBjBOByD+5bYsQ=="],
37
+
38
+ "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.54.0", "", { "os": "linux", "cpu": "none" }, "sha512-f05YMG4BH4G8S4ME6UM6fi1MnJ9094mrnvO5Pa4SJlMfWlUM+1/ZWMEF4NnjM7shZAvbHsHRuVYpUo0PHC4P9Q=="],
39
+
40
+ "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.54.0", "", { "os": "linux", "cpu": "none" }, "sha512-UfL+2hj1ClNqcCRT9s8vBU4axDpjxgVxX96G+9DYAYjoc5b0u15CJtn2jgsi9iM+EbGNc5CW1HVRgwVu76UsSA=="],
41
+
42
+ "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.54.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-3/XZe931Hka+J6NjnaqJzYpsWWxDTuRdUdwSQHnOuJEgbC+SehIMFJS8hsEjV7LBhVSL2OCnRLvbVW8O97XIyw=="],
43
+
44
+ "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.54.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Ik93RlObtu43GbxApafayFjwYE06L6Xr08cSwpBPYbDrLp2ReZx0Jm1DqwRyYRnukUJy+rK2WaEvUQOxdytU9Q=="],
45
+
46
+ "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.54.0", "", { "os": "linux", "cpu": "x64" }, "sha512-yZcakmPlD86CNymknd7KfW+FH+qfbqJH+i0h69CYfV1+KMoVeM9UED+8+TDVoU4haxI0NxY7RPCvRLy3Sqd2Qg=="],
47
+
48
+ "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.54.0", "", { "os": "none", "cpu": "arm64" }, "sha512-GiVBZNnEZnKu00f1jTg49nomv187d0GQX+O+ocykoLeiaALuEO+swoTehHn9TehTfi7V8H0i0e/yvUjCqnwk1w=="],
49
+
50
+ "@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.54.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-J0SSB8Z1Fre2sxRolYcW6Rl1RQmKdQ2hnHyq4YJrfBRiXTObLw4DXnIVraM/UyqGqwOi7yTrQA4VT7DPxlHVKA=="],
51
+
52
+ "@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.54.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-O61UDVj8zz6yXJjkHPf05VaMLOXmEF8P5kf/N0W7AQMmd6bcQogl+KJc7rMutKTL524oE9iH32JXZClBFmEQIg=="],
53
+
54
+ "@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.54.0", "", { "os": "win32", "cpu": "x64" }, "sha512-1MDpqJPiFqxWtIHas8vkb1VZ7f7eKyTffAwmO8isxQYMaG1OFKsH666BWLeXQLO+IWNfiMssLD55hbR1lIPTqg=="],
55
+
56
+ "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.69.0", "", { "os": "android", "cpu": "arm" }, "sha512-DKQQbD5cZ/MYfDgDI7YGyGD9FSxABlsBsYFo5p26lloob543tP9+4N3guwdXIYJN+7HSZxLe8YJuwcOWw5qnHg=="],
57
+
58
+ "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.69.0", "", { "os": "android", "cpu": "arm64" }, "sha512-lEhb+I5pr4inux+JFwfCa1HRq3Os7NirEFQ0H1I35SVEHPm6byX0Ah47xmRha3qi6LAkxUcxViL8o/9PivjzBg=="],
59
+
60
+ "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.69.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-GY2YE8lOZW59BW1Ia1y+1gR0XyjrZRvVWHAr8LGeGhYHE0OQJ/7cRKXTkx1P+E9/6awEc3SX8a68SFTjh/E//A=="],
61
+
62
+ "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.69.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-ax1oZnOjHX3LB7myQyHEaQkDwfLb6str3/nSP6O7EVUviQGNkEGzGV0EqcBJWK+Ufwx0l4xPgyYayurvhAdl2Q=="],
63
+
64
+ "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.69.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-kHWeHv4g2h8NY+mpCxzCtY4uerMJWTN/TSnNj1CPbakFpHEJ6cTya2wWV0pDSYWOJ2+0UiEbhn3AtXxHtsnKjg=="],
65
+
66
+ "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.69.0", "", { "os": "linux", "cpu": "arm" }, "sha512-gq84vM1a1oEehXo27YCDzGVcxPsZDI1yswZwz2Da1/cbnWtrL16XZZnz0G/+gIU8edtHpfjxq5c+vWEHqJfWoQ=="],
67
+
68
+ "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.69.0", "", { "os": "linux", "cpu": "arm" }, "sha512-kIqEa98JQ0VRyrcncxA417m2AzasqTlD+FyVT1AksjvjkqQcvm7pBWYvoW3/mpyOP2XYvi5nSCCTIe6De1yu5g=="],
69
+
70
+ "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.69.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-j+xYiXozxGWx2cpjCrwwGR4awTxPFsRv3JZrv23RCogEPMc4R7UqjHW47p/RG0aRlbWiROCJ8coUfCwy0dvzHA=="],
71
+
72
+ "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.69.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-xEPpNppTfN1l/nM7gYSf9iocscu/as+p/7vxkLeLEKnYU+09Dm+5V6IhDYDh+Uz6FajEupWwCLt5SOG0y1PCKg=="],
73
+
74
+ "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.69.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Ug0+eU7HJBlek+SjklYH62IlOMirEJsdxpihH0kSqX0XdrDD4NdHpQc10fK1JC35yn6KrrcN+uYzlHD38XAf8Q=="],
75
+
76
+ "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.69.0", "", { "os": "linux", "cpu": "none" }, "sha512-iEyI3GIg0l/s3G4qy2TlaaWKdzj4PJJStwtlocpDTC00PY9hZueotf6OKUj9+yfQh0lrpBW/pLMgTztbAHKJEg=="],
77
+
78
+ "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.69.0", "", { "os": "linux", "cpu": "none" }, "sha512-NjHjpiI4WIKSMwuoJSZi5VToPeoYOS1FR52HLIDG6lidMdqquusgtODb4iLk0+lb1q3Z0nv2/aPRcC/olmpQGg=="],
79
+
80
+ "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.69.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-Ai/prDewoItkDXbp38gwGZi41DycZbUTZJ3UidwoHgQC0/DaqC2TGdtBTQLJ6hSD+SAxASzh8+/eSBPmxfOacA=="],
81
+
82
+ "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.69.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Gt3KHgp46mRKz4sJeaASmKvD8ayXookRw07RMf+NowhEztGGDZ7VrXpoW96XuKJLjFukWizOFVNjmYb/u7caNQ=="],
83
+
84
+ "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.69.0", "", { "os": "linux", "cpu": "x64" }, "sha512-7tQhJ2+p/oHv1zcfnjYI7YVzC/7iBaVOfIvFYtxdJ5F45mWgEdrCyXZXZGfiLey5t/5JhOhsaMnnv1kAzckd7g=="],
85
+
86
+ "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.69.0", "", { "os": "none", "cpu": "arm64" }, "sha512-vmWz6TKp/3hfA4lksR0zHBv/6xuX1jhym6eqOjdH2DXsDDHZWcp2f0KG0VCAnlVbIrjk29G4wAWMXb/Hn1YobA=="],
87
+
88
+ "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.69.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-9RExaLgmaw6IoIkU9cTpT71mLfI0xZ86iZH8x518LVsOkjquJMYqb9P7KpC8lgd1t0Dxs41p2pxynq4XR3Ttzw=="],
89
+
90
+ "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.69.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-1907kRPF8/PrcIw1E7LMs9JbVrpgnt/MvFdss3an8oDkYNAACXzTntV3t3869ZZhMZxb2AzRGbz1pA/jdFatXA=="],
91
+
92
+ "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.69.0", "", { "os": "win32", "cpu": "x64" }, "sha512-w8SOXv3mT9Fi6jY8OXdXCfnvX/3KNLXGNr4HEz2TA7S4Mv/PYAOmpB8y/ge40mxvBMgGNaSaaDwZpAsQn7HtWA=="],
93
+
94
+ "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
16
95
 
17
96
  "@types/node": ["@types/node@22.13.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg=="],
18
97
 
19
- "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
98
+ "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
99
+
100
+ "oxfmt": ["oxfmt@0.54.0", "", { "dependencies": { "tinypool": "2.1.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.54.0", "@oxfmt/binding-android-arm64": "0.54.0", "@oxfmt/binding-darwin-arm64": "0.54.0", "@oxfmt/binding-darwin-x64": "0.54.0", "@oxfmt/binding-freebsd-x64": "0.54.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.54.0", "@oxfmt/binding-linux-arm-musleabihf": "0.54.0", "@oxfmt/binding-linux-arm64-gnu": "0.54.0", "@oxfmt/binding-linux-arm64-musl": "0.54.0", "@oxfmt/binding-linux-ppc64-gnu": "0.54.0", "@oxfmt/binding-linux-riscv64-gnu": "0.54.0", "@oxfmt/binding-linux-riscv64-musl": "0.54.0", "@oxfmt/binding-linux-s390x-gnu": "0.54.0", "@oxfmt/binding-linux-x64-gnu": "0.54.0", "@oxfmt/binding-linux-x64-musl": "0.54.0", "@oxfmt/binding-openharmony-arm64": "0.54.0", "@oxfmt/binding-win32-arm64-msvc": "0.54.0", "@oxfmt/binding-win32-ia32-msvc": "0.54.0", "@oxfmt/binding-win32-x64-msvc": "0.54.0" }, "peerDependencies": { "svelte": "^5.0.0", "vite-plus": "*" }, "optionalPeers": ["svelte", "vite-plus"], "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-DjnMwn7smSLF+Mc2+pRItnuPftm/dkUFpY/d4+33y9TfKrsHZo8GLhmUg9BrOIUEy94Rlom1Q11N6vuhE+e0oQ=="],
101
+
102
+ "oxlint": ["oxlint@1.69.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.69.0", "@oxlint/binding-android-arm64": "1.69.0", "@oxlint/binding-darwin-arm64": "1.69.0", "@oxlint/binding-darwin-x64": "1.69.0", "@oxlint/binding-freebsd-x64": "1.69.0", "@oxlint/binding-linux-arm-gnueabihf": "1.69.0", "@oxlint/binding-linux-arm-musleabihf": "1.69.0", "@oxlint/binding-linux-arm64-gnu": "1.69.0", "@oxlint/binding-linux-arm64-musl": "1.69.0", "@oxlint/binding-linux-ppc64-gnu": "1.69.0", "@oxlint/binding-linux-riscv64-gnu": "1.69.0", "@oxlint/binding-linux-riscv64-musl": "1.69.0", "@oxlint/binding-linux-s390x-gnu": "1.69.0", "@oxlint/binding-linux-x64-gnu": "1.69.0", "@oxlint/binding-linux-x64-musl": "1.69.0", "@oxlint/binding-openharmony-arm64": "1.69.0", "@oxlint/binding-win32-arm64-msvc": "1.69.0", "@oxlint/binding-win32-ia32-msvc": "1.69.0", "@oxlint/binding-win32-x64-msvc": "1.69.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.22.1", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-ypZkK/aDc5NQV8zIR6s2H2Tl3aNW8FmJ1m9+2qsaYuRenl8vgnHNCGwTHviWJdUQzglOlHFchgopdtGhSy17Rw=="],
20
103
 
21
- "bun-types": ["bun-types@1.2.5", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="],
104
+ "tinypool": ["tinypool@2.1.0", "", {}, "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw=="],
22
105
 
23
- "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
106
+ "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
24
107
 
25
108
  "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
26
109
  }
package/package.json CHANGED
@@ -1,31 +1,33 @@
1
1
  {
2
2
  "name": "@flowscripter/template-bun-rust-library",
3
+ "version": "1.1.1",
3
4
  "description": "Project template for a Rust library with Bun FFI bindings",
4
- "homepage": "https://github.com/flowscripter/template-bun-rust-library#readme",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/flowscripter/template-bun-rust-library.git"
8
- },
9
- "license": "MIT",
10
5
  "keywords": [
11
6
  "bun",
12
7
  "example",
8
+ "ffi",
13
9
  "library",
14
- "template",
15
10
  "rust",
16
- "ffi"
11
+ "template"
17
12
  ],
18
- "module": "index.ts",
13
+ "homepage": "https://github.com/flowscripter/template-bun-rust-library#readme",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/flowscripter/template-bun-rust-library.git"
18
+ },
19
19
  "type": "module",
20
- "version": "1.0.26",
21
- "ffiLibBaseUri": "https://github.com/flowscripter/template-bun-rust-library/releases/download/v1.0.26",
20
+ "module": "index.ts",
22
21
  "publishConfig": {
23
22
  "access": "public"
24
23
  },
25
24
  "devDependencies": {
26
- "@types/bun": "^1.2.5"
25
+ "@types/bun": "^1.3.14",
26
+ "oxfmt": "0.54.0",
27
+ "oxlint": "1.69.0"
27
28
  },
28
29
  "peerDependencies": {
29
- "typescript": "^5.8.2"
30
- }
30
+ "typescript": "^6.0.3"
31
+ },
32
+ "ffiLibBaseUri": "https://github.com/flowscripter/template-bun-rust-library/releases/download/v1.1.1"
31
33
  }
package/src/lib-path.ts CHANGED
@@ -11,7 +11,7 @@ export async function getLibPath(libName: string) {
11
11
  fullLibName = "lib" + fullLibName;
12
12
  }
13
13
 
14
- // look for release build location in preference
14
+ // look in release build location
15
15
  const builtLibPath = path.join("target", "release", fullLibName);
16
16
 
17
17
  console.debug(`builtLibPath: ${builtLibPath}`);
@@ -25,7 +25,7 @@ export async function getLibPath(libName: string) {
25
25
  return builtLibPath;
26
26
  }
27
27
 
28
- // look for release installed location
28
+ // look in release installed location
29
29
  const installedLibFolder = path.join(os.homedir(), ".flowscripter", "lib");
30
30
  const installedLibPath = path.join(installedLibFolder, fullLibName);
31
31
  const installedLibFile = Bun.file(installedLibPath);
@@ -40,7 +40,7 @@ export async function getLibPath(libName: string) {
40
40
 
41
41
  console.debug(`packageJson.ffiLibBaseUri: ${packageJson.ffiLibBaseUri}`);
42
42
 
43
- // look for release download location
43
+ // look in release download location
44
44
  const remotePath = path.join(packageJson.ffiLibBaseUri, fullLibName);
45
45
 
46
46
  console.debug(`remotePath: ${remotePath}`);
@@ -52,9 +52,7 @@ export async function getLibPath(libName: string) {
52
52
 
53
53
  await Bun.write(installedLibPath, result);
54
54
  } catch (e) {
55
- console.error(
56
- `Failed to download ${remotePath} to ${installedLibPath}: ${e}`,
57
- );
55
+ console.error(`Failed to download ${remotePath} to ${installedLibPath}: ${e}`);
58
56
  }
59
57
 
60
58
  return installedLibPath;
package/src/lib.ts CHANGED
@@ -6,21 +6,13 @@ const libPath = await getLibPath("flowscripter_template_bun_rust_library");
6
6
  console.debug(`dlopen libPath: ${libPath}`);
7
7
 
8
8
  const {
9
- symbols: {
10
- add,
9
+ symbols: { add },
10
+ } = dlopen(libPath, {
11
+ add: {
12
+ args: [FFIType.i32, FFIType.i32],
13
+ returns: FFIType.i32,
11
14
  },
12
- } = dlopen(
13
- libPath,
14
- {
15
- add: {
16
- args: [
17
- FFIType.i32,
18
- FFIType.i32,
19
- ],
20
- returns: FFIType.i32,
21
- },
22
- },
23
- );
15
+ });
24
16
 
25
17
  /**
26
18
  * Adds 2 and 2 and logs the result as "World 4"
package/tsconfig.json CHANGED
@@ -14,6 +14,9 @@
14
14
  "verbatimModuleSyntax": true,
15
15
  "noEmit": true,
16
16
 
17
+ // Types
18
+ "types": ["bun", "node"],
19
+
17
20
  // Best practices
18
21
  "strict": true,
19
22
  "skipLibCheck": true,
@@ -23,5 +26,6 @@
23
26
  "noUnusedLocals": false,
24
27
  "noUnusedParameters": false,
25
28
  "noPropertyAccessFromIndexSignature": false
26
- }
29
+ },
30
+ "exclude": ["tests"]
27
31
  }