Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikelevins/electron-sbcl-sqlite
A simple boilerplate that builds an Electron app with SBCL and SQLite3 embedded
https://github.com/mikelevins/electron-sbcl-sqlite
Last synced: 3 months ago
JSON representation
A simple boilerplate that builds an Electron app with SBCL and SQLite3 embedded
- Host: GitHub
- URL: https://github.com/mikelevins/electron-sbcl-sqlite
- Owner: mikelevins
- Created: 2020-12-19T17:28:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-19T18:00:14.000Z (almost 4 years ago)
- Last Synced: 2024-05-19T05:34:59.832Z (6 months ago)
- Language: Common Lisp
- Size: 8.79 KB
- Stars: 28
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
- curated-awesome-cl - electron-sbcl-sqlite
README
= electron-sbcl-sqlite
v0.0.1
mikel evins
:toc:== Overview
A very simple Electron boilerplate that sets up an app whose application logic is handled by a Lisp child process, whose UI is handled by Electron, and whose persistence solution is SQLite. Uses sbcl with quicklisp and Hunchentoot to build the Lisp helper process, and electron-packager to build delivered app.
Assumes that a suitable version of SQLite3 is installed and findable by CFFI.
Tested on macOS Big Sur with SBCL 2.0.11 and SQlite3 3.32.3.
== Building and Running the App
1. Ensure that these dependencies are properly installed:
. https://nodejs.org/en/download/[A recent version of node and npm]
. https://github.com/electron/electron-packager[electron-packager]
. http://www.sbcl.org/platform-table.html[SBCL]
. https://www.quicklisp.org/beta/[Quicklisp]2. Using git, clone this repository.
3. cd into the cloned repository and run sh ./build.sh
4. Run the built app:
`open electron-sbcl-sqlite-darwin-x64/electron-sbcl-sqlite.app`== Extending and Adapting It
The simple project's purpose is to set up a bare minimum framework showing how you can build an Electron app on Lisp and SQLite. It doesn't do much more than that. The launched app fetches SBCL's `\*FEATURES*` list and uses the SQLite interface to get SQLite3's version string and its list of compile_options. To do more than that, you'll have to explore the tools and APIs yourself.
A good starting place might be to look at the easy-handler definition for "/" in the file "electron-sbcl-sqlite/lisp/src/electron-sbcl-sqlite.lisp". Its `LET*` bindings use the `SQLITE` library's APIs to execute a simple SQL statement and a pragma to get the SQLite data that is displayed in the window.