Sigil 0.24.9
A packaging and build release. You can now ship a Sigil app with its libraries, helper programs and data as one Linux executable that people download and run. Native builds include only the modules your app actually imports, and a missing dependency now stops the build instead of failing when your app first runs. There's also a new way to update files safely in directories that other programs can change, and a sigil serve command for trying a web build in your browser.
Ship an app as one Linux executable
If your app needs more than a single executable, like shared libraries, helper programs or a directory of assets, the new (sigil build runtime) library can package all of it as one Linux x86-64 executable. The first time someone runs it, it verifies your files and unpacks them into their cache, and later runs reuse them. The portable runtime guide walks you through packaging an app, choosing whether to carry your own loader and libraries, and what your app still needs to take care of itself. Packaged apps also start when your home or cache directory goes through a symbolic link owned by root or by you, in a directory only root or you can write to, as on systems where /home is a link.
For apps that install their own files on Linux, the new (sigil apps install linux files) helpers leave alone any file that someone changed or that they didn't install.
(sigil apps release) now reads Windows app manifests for AMD64 ZIP bundles.
Native builds include only what your app imports
Native builds now start from your entry module and follow what it actually imports, including libraries you choose with cond-expand. A module you left out for one platform no longer ends up in that platform's build. Every import is checked before the bundle is written, so a missing module stops the build by name instead of failing the first time your app runs.
Update files safely in shared directories
When other programs can change the directory your app writes into, the directory can be renamed or replaced while you're working in it. The new (sigil fs anchored) module lets you open a directory once and work relative to that handle, which keeps pointing at the same directory even if its path is renamed or replaced. With exclusive creation, no-replace rename and explicit syncing, you can write a new version under a temporary name and rename it into place, so other programs never read a half-written file. It supports Linux with glibc or musl for now, and locking between writers is still up to your app.
Host local files or a web build for your browser
You no longer need Python or Node to host a local folder to view files in the browser! Run sigil serve in your project and open http://127.0.0.1:8770/ to browse the output in your build/web directory. Pass a directory and a port to serve something else, like sigil serve public --port 8080. It only listens on your own machine unless you choose another interface with --host, and --listing turns on directory listings. Scripts can start the same server with http-serve-directory from (sigil shell).
Fixes
- On Windows, capturing a child process's output could hang forever when the child filled its output pipe before reading all of its input. Sigil now drains the output while it sends the input.
formatwith~sprinted keywords as#<object>. It now writes them with their readable spelling.- A package's development-only version ranges, such as those for its test dependencies, could constrain your app's runtime dependencies. They're now left out when your app consumes the package.
- Valid small libraries failed to compile because of an arbitrary minimum bytecode size. They compile now, and structurally empty compiler output is refused before it's published.
- A running bundle kept its whole embedded archive in memory. It now reads the archive from its file as needed, and
bundled-archive-extract-filefrom(sigil archive)streams a single entry to disk. When writing a bundle, the newbundle-add-file-asset!streams a file in instead of reading it all first. Rewriting a bundle's executable base keeps its appended archive, and when you build over an existing executable, that file stays intact until the new one is complete. - Parallel bootstrap builds now compile the async wakeup module after the modules it imports. The CLI also keeps its own native-provider module ahead of stale copies in your project on the library path.
- A build with a conflicting backend setting now reports that conflict before validating the workspace runtime. Web builds also accept a dependency you deliberately skipped when the selected consumer supplies its native initializer stub.
Known issues
- Interactive terminal apps aren't supported by the portable runtime yet. A packaged app that reads from the terminal stops at its first read, and the launcher waits for it indefinitely. Apps that don't read from the terminal, including apps given piped input, aren't affected.