Oicana 0.10: Go, Ruby, and Dart/Flutter
Oicana 0.10 is out. It brings three new integrations for Go, Ruby, and Dart/Flutter. Together with the browser, Node.js, C#, Java, Rust, Python, and PHP, your document templates now work in ten tech stacks.
New integrations
Section titled “New integrations”template, err := oicana.NewTemplate(templateBytes)if err != nil { log.Fatal(err)}
pdf, err := template.ExportPdf(oicana.Inputs{ JSON: map[string]any{"info": map[string]any{"name": "Alice from Go"}},})template = Oicana::Template.new(File.binread("example-0.1.0.zip"))
pdf = template.export_pdf(json_inputs: { "info" => { name: "Alice from Ruby" } })final template = await Template.load(templateBytes);
final pdf = await template.exportPdf(jsonInputs: { 'info': {'name': 'Alice from Dart'},});- Go: module
go.oicana.com/oicana- it requires cgo - Ruby:
oicanagem - Dart and Flutter:
oicanapackage - supports Android, iOS, the web, Linux, macOS, Windows, and generally plain Dart programs
Each new integration has a getting started chapter (Go, Ruby, Dart) and an open source example application in the Oicana GitHub organization: Go with net/http, Ruby on Rails, Flutter, and Dart with Shelf.
Other highlights
Section titled “Other highlights”- Browser:
@oicana/browsernow bundles the WASM module, so@oicana/browser-wasmis no longer needed. - C#: platform support for Alpine and other musl-based Linux and for Windows arm64. The package was split into
Oicana.Coreand one native package per platform to enable smaller deployments.Oicanastill depends on all of them, so existing installs keep working. - CLI: fuzzing tests support many more JSON Schema features. They now generate realistic values for string formats like
date,email, oruuid, and name the generated input of a failing test. - Better errors for JSON inputs that are not valid JSON and for missing packages in a template.
The changelog lists all changes and has some migration instructions.
Get started with Oicana