Skip to content

Commit 4839f9f

Browse files
committed
Prepare 0.0.2 six-platform release
1 parent 72c0a58 commit 4839f9f

14 files changed

Lines changed: 76 additions & 23 deletions

File tree

CMakeLists.txt

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.20)
2-
project(sxn VERSION 0.0.1 LANGUAGES C)
2+
project(sxn VERSION 0.0.2 LANGUAGES C)
33
# Every other dependency here (curl, zlib, libuv, libffi) resolves to a
44
# dylib under /usr/lib on macOS - part of the OS, present on every Mac.
55
# OpenSSL doesn't ship there anymore, so find_package(OpenSSL) resolves to
@@ -9,8 +9,32 @@ project(sxn VERSION 0.0.1 LANGUAGES C)
99
if(APPLE)
1010
set(OPENSSL_USE_STATIC_LIBS TRUE)
1111
endif()
12-
find_package(OpenSSL REQUIRED)
13-
find_package(CURL REQUIRED)
12+
if(DEFINED SXN_CROSS_DEPS_ROOT)
13+
# Cross builds cannot use the host's FindOpenSSL/CURL/ZLIB results. The
14+
# release builder supplies a target sysroot containing import libraries.
15+
set(_cross_root "${SXN_CROSS_DEPS_ROOT}")
16+
add_library(OpenSSL::Crypto UNKNOWN IMPORTED)
17+
set_target_properties(OpenSSL::Crypto PROPERTIES
18+
IMPORTED_LOCATION "${_cross_root}/lib/libcrypto.dll.a"
19+
INTERFACE_INCLUDE_DIRECTORIES "${_cross_root}/include")
20+
add_library(OpenSSL::SSL UNKNOWN IMPORTED)
21+
set_target_properties(OpenSSL::SSL PROPERTIES
22+
IMPORTED_LOCATION "${_cross_root}/lib/libssl.dll.a"
23+
INTERFACE_INCLUDE_DIRECTORIES "${_cross_root}/include"
24+
INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
25+
add_library(CURL::libcurl UNKNOWN IMPORTED)
26+
set_target_properties(CURL::libcurl PROPERTIES
27+
IMPORTED_LOCATION "${_cross_root}/lib/libcurl.dll.a"
28+
INTERFACE_INCLUDE_DIRECTORIES "${_cross_root}/include"
29+
INTERFACE_LINK_LIBRARIES "ws2_32;crypt32;bcrypt;advapi32")
30+
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
31+
set_target_properties(ZLIB::ZLIB PROPERTIES
32+
IMPORTED_LOCATION "${_cross_root}/lib/libz.dll.a"
33+
INTERFACE_INCLUDE_DIRECTORIES "${_cross_root}/include")
34+
else()
35+
find_package(OpenSSL REQUIRED)
36+
find_package(CURL REQUIRED)
37+
endif()
1438
# libuv ships a CMake config package from Homebrew and vcpkg, but Ubuntu's
1539
# libuv1-dev provides only pkg-config, so fall back to that rather than
1640
# requiring the config package everywhere.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ irm https://sxfescript.github.io/latest/install.ps1 | iex
6161
```
6262

6363
Both install to `~/.sxn/bin` (`%USERPROFILE%\.sxn\bin` on Windows) and add it
64-
to your PATH. Swap `latest` for a version tag (`v0.0.1`) in either URL to pin
64+
to your PATH. Swap `latest` for a version tag (`v0.0.2`) in either URL to pin
6565
a specific release instead of always getting the newest one.
6666

67+
The 0.0.2 pre-release includes binaries for macOS arm64/x64, Linux arm64/x64,
68+
and Windows arm64/x64. The release builds are documented in [`llm.txt`](llm.txt)
69+
and the reproducible packaging entry point is [`scripts/release.sh`](scripts/release.sh).
70+
6771
## Build
6872

6973
Needs OpenSSL, libcurl, libuv, zlib, and libffi on the system (`brew install

docs/guide/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ sxn examples/files.sx
105105
```
106106
"written by the example\n"
107107
via node:fs -> "written by the example\n"
108-
sxn version: 0.0.1
108+
sxn version: 0.0.2
109109
```
110110

111111
## Calling a C function

docs/guide/install.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ irm https://sxfescript.github.io/latest/install.ps1 | iex
1717

1818
Both arm64 and x64 are built for every platform. The script picks the right one.
1919

20+
Release 0.0.2 provides macOS, Linux, and Windows binaries for both arm64 and
21+
x64. See the repository's `llm.txt` for build and verification notes.
22+
2023
## Where it goes
2124

2225
`~/.sxn/bin` on macOS and Linux, `%USERPROFILE%\.sxn\bin` on Windows, and the
@@ -27,7 +30,7 @@ sxn --version
2730
```
2831

2932
```
30-
sxn 0.0.1
33+
sxn 0.0.2
3134
```
3235

3336
## Pinning a version
@@ -36,7 +39,7 @@ Swap `latest` for a release tag in either URL to install that version instead
3639
of the newest:
3740

3841
```sh
39-
curl -fsSL https://sxfescript.github.io/v0.0.1/install.sh | bash
42+
curl -fsSL https://sxfescript.github.io/v0.0.2/install.sh | bash
4043
```
4144

4245
## Building from source

docs/guide/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sxn --version
1212
```
1313

1414
```
15-
sxn 0.0.1
15+
sxn 0.0.2
1616
```
1717

1818
## Your first program

docs/guide/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sxn hello.js
1414
```
1515

1616
```
17-
hello from sxn 0.0.1
17+
hello from sxn 0.0.2
1818
```
1919

2020
## TypeScript, without `tsc`

include/sxfe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
extern "C" {
1010
#endif
1111

12-
#define SXFE_VERSION "0.0.1"
12+
#define SXFE_VERSION "0.0.2"
1313

1414
/* Length of the absolute-path root at p: 0 if relative, 1 for POSIX's
1515
leading '/', or 3 for a Windows drive letter (`C:/` or `C:\`). Used by

llm.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SXN release notes for language models
2+
3+
Current release: 0.0.2.
4+
5+
Six verified release binaries are built and packaged under `dist/0.0.2/`:
6+
7+
- macOS arm64 and x86_64 (Mach-O)
8+
- Linux arm64 and x86_64 (ELF)
9+
- Windows arm64 and x86_64 (PE32+)
10+
11+
The macOS and Linux builds pass all 102 CTest cases. Windows artifacts are
12+
cross-compiled and verified for PE architecture and embedded `sxn 0.0.2`, but
13+
are not execution-tested on Windows hardware in this workspace.
14+
15+
For release work, `scripts/release.sh` builds the native/cross Unix targets
16+
and uploads archives. Unix targets use `.tar.gz`; Windows installers use
17+
`.zip` (the PowerShell installer expects that format). Prebuilt Windows
18+
archives must be placed in `dist/`.

llms.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SxfeScript / SXN
2+
3+
The current release is 0.0.2. See `llm.txt` for the verified six-platform
4+
binary matrix, build provenance, and test status. The source documentation is
5+
in `README.md`, `docs/`, and `spec/`.

scripts/release.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env bash
2-
# Builds sxn for every target this session can reach locally (macOS
3-
# arm64/x64, Linux arm64/x64) and uploads them to a GitHub release.
4-
# Windows isn't built here - there's no Windows machine in this setup, so
5-
# it stays CI's job (see .github/workflows/ci.yml); this script only
6-
# covers what these two machines can actually build and test themselves.
2+
# Builds and packages the macOS/Linux targets reachable from this host and
3+
# uploads any matching prebuilt Windows archives supplied in dist/. Windows
4+
# x64/arm64 are cross-built separately; keep their binaries in dist/ before
5+
# invoking this script so a release contains all six targets.
76
#
87
# Usage: scripts/release.sh vX.Y.Z [--prerelease]
98
#
@@ -97,7 +96,7 @@ else
9796
fi
9897

9998
echo "== Uploading to $REPO release $VERSION =="
100-
assets=(dist/sxn-"${VERSION#v}"-*.tar.gz)
99+
assets=(dist/sxn-"${VERSION#v}"-*.tar.gz dist/sxn-"${VERSION#v}"-*.zip)
101100
if gh release view "$VERSION" --repo "$REPO" >/dev/null 2>&1; then
102101
gh release upload "$VERSION" "${assets[@]}" --repo "$REPO" --clobber
103102
else

0 commit comments

Comments
 (0)