documentation

This commit is contained in:
grngxd 2025-06-16 23:14:50 +01:00
parent 967b77c51c
commit ea43f3a058
2 changed files with 88 additions and 1 deletions

35
LICENSE Normal file
View file

@ -0,0 +1,35 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 16 June 2025
TERMS AND CONDITIONS
0. Definitions.
This License applies to any program or other work which contains a notice placed by the copyright holder stating it may be distributed under the terms of this General Public License.
1. Source Code.
The "source code" for a work means the preferred form of the work for making modifications to it.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of Section 4.
6. Disclaimer of Warranty.
There is no warranty for the program, to the extent permitted by applicable law. Unless otherwise stated in writing, the copyright holders and/or other parties provide the program "AS IS" without warranty of any kind.
END OF TERMS AND CONDITIONS

View file

@ -1,4 +1,56 @@
# 🍥 tiramisu # 🍥 tiramisu
> ` is tiramisu a cake or a pie?` > ` is tiramisu a cake or a pie?`
Build modern, cross-platform desktop apps in HTML + Go from one codebase. Build modern, cross-platform desktop apps in HTML + Go from one codebase. It uses the built-in OS webview (WebView2 on Windows, WebKitGTK on Linux, and WebKit on macOS) to render HTML to the screen. Tiramisu creates a connection between Go and the webview, allowing you manipulate the UI and calling Go methods from the webview seamlessly.
## Features
- 💻 **Cross-platform**: Write once, run everywhere. Tiramisu supports Windows, macOS, and Linux.
- 🪶 **Lightweight**: No need for a heavy framework. Tiramisu uses the built-in webview of the OS.
- ⚡**Fast development**: Use *ANY* web framework for your UI. Tiramisu handles all the magic of making it work, for you.
## Installation
`go install github.com/grngxd/tiramisu`
## Example
```go
package main
import (
"fmt"
"github.com/grngxd/tiramisu"
)
func main() {
// create the webview instance
app := tiramisu.New(tiramisu.Options{
Title: "Tiramisu Example",
Width: 800,
Height: 600,
})
// bind a go function to the webview
app.Bind("hello", func(name string) string {
return fmt.Sprintf("Hello, %s!", name)
})
// set the HTML content of the webview
app.HTML(`
<h1>Tiramisu Example</h1>
<button onclick="tiramisu.invoke('hello', 'world').then(alert)">Greet</button>
`)
// t.Run() also allows you to pass a func(), which is executed on the main thread
// before the webview is shown, so you can do any setup you need.
app.Run(/* func() {
// This code runs on the main thread before the webview is shown
fmt.Println("Webview is ready!")
}*/)
}
```
## Contributing & Development
```bash
## License
`tiramisu` is licensed under the GNU General Public License (GPL) v3.0. See the [LICENSE](LICENSE) file for more details.