https://github.com/flowscripter/template-bun-executable
Project template for a cross-platform Bun executable with ffi native library and Bun library dependencies.
https://github.com/flowscripter/template-bun-executable
bun cli typescript
Last synced: 11 months ago
JSON representation
Project template for a cross-platform Bun executable with ffi native library and Bun library dependencies.
- Host: GitHub
- URL: https://github.com/flowscripter/template-bun-executable
- Owner: flowscripter
- License: mit
- Created: 2025-02-13T18:11:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T01:12:16.000Z (over 1 year ago)
- Last Synced: 2025-02-27T02:23:55.606Z (over 1 year ago)
- Topics: bun, cli, typescript
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-bun-executable
[](https://github.com/flowscripter/template-bun-executable/releases)
[](https://github.com/flowscripter/template-bun-executable/actions/workflows/release-bun-executable.yml)
[](https://codecov.io/gh/flowscripter/template-bun-executable)
[](https://github.com/flowscripter/template-bun-executable/blob/main/LICENSE)
> Project template for a cross-platform Bun executable with ffi native library
> and Bun library dependencies
## Template Usage
Create a new Bun project using this as a template:
`bun create @flowscripter/template-bun-executable`
## Binary Executable Usage
**NOTE**: The binaries are 10's of megabytes in size as the entire Bun runtime
is included.
#### MacOS
Via [Homebrew](https://brew.sh/):
`brew install flowscripter/tap/template-bun-executable`
#### Linux
In a terminal:
`curl -fsSL https://raw.githubusercontent.com/flowscripter/template-bun-executable/main/script/install.sh | sh`
#### Windows
Via [Winget](https://github.com/microsoft/winget-cli):
`winget install Flowscripter.template-bun-executable`
#### Manual Install
You can download and extract the binary zip files from the
[releases](https://github.com/flowscripter/template-bun-executable/releases)
page.
## Functional Tests
Refer to [functional_tests/README.md](functional_tests/README.md)
## Development
Install dependencies:
`bun install`
Test:
`bun test`
Run:
`bun run index.ts`
Compile binary:
`bun build index.ts --compile --outfile /tmp/template-bun-executable`
**NOTE**: The following tasks use Deno as it excels at these and Bun does not
currently provide such functionality:
Format:
`deno fmt`
Lint:
`deno lint index.ts src/ tests/`
## Documentation
### Overview
Sample mermaid diagram to test rendering in markdown:
```mermaid
classDiagram
Foo <|-- Bar
```
## License
MIT © Flowscripter