diff --git a/CHANGELOG.md b/CHANGELOG.md index 66ecdc8..524314b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.0-alpha.4] - 2026-02-26 + +### Added +- Automated fallback to source build for Windows (`win32`) via `postinstall` script +- Added `Cargo.toml`, `Cargo.lock`, `build.rs`, and `src/` to published npm files to support building from source + +### Changed +- Documentation: Updated README to clarify Windows installation limitations and roadmap + ## [0.1.0-alpha.3] - 2026-02-09 ### Fixed @@ -107,7 +116,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Security policy and code of conduct - GitHub issue templates for bug reports and feature requests -[Unreleased]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.2...HEAD +[Unreleased]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.4...HEAD +[0.1.0-alpha.4]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.3...v0.1.0-alpha.4 [0.1.0-alpha.3]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.2...v0.1.0-alpha.3 [0.1.0-alpha.2]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.1...v0.1.0-alpha.2 [0.1.0-alpha.1]: https://github.com/dmytroPolhul/eventum/compare/v0.1.0-alpha.0...v0.1.0-alpha.1 diff --git a/Cargo.lock b/Cargo.lock index a37964b..1548135 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,7 +110,7 @@ dependencies = [ [[package]] name = "eventum" -version = "0.1.0-alpha.3" +version = "0.1.0-alpha.4" dependencies = [ "chrono", "colored", diff --git a/Cargo.toml b/Cargo.toml index 2e5daf1..6fa73d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "eventum" -version = "0.1.0-alpha.3" +version = "0.1.0-alpha.4" edition = "2021" build = "build.rs" diff --git a/README.md b/README.md index ab9ece6..287f6ee 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,24 @@ yarn add eventum --- +## Windows support + +Prebuilt binaries for Windows are temporarily unavailable due to npm publishing restrictions. + +Windows users can build from source using: + +- Rust (stable toolchain) +- Node.js >= 18 +- Visual Studio Build Tools + +Run: + +```bash +npm install +``` + +--- + ## Quick Start ```ts @@ -302,7 +320,7 @@ MIT ## Roadmap - [ ] Async file writing support (currently uses synchronous I/O) -- [x] Prebuilt binaries for common platforms (npm, arm64, x64) +- [x] Prebuilt binaries for common platforms (npm, arm64, x64) — *Windows temporarily requires manual build* - [ ] External transport targets (HTTP, sockets, Kafka, etc.) - [ ] WebAssembly support - [ ] File compression on rotation @@ -311,6 +329,7 @@ MIT ## Known Limitations (Alpha) +- **Windows support**: Prebuilt binaries are temporarily unavailable due to npm restrictions. Windows users must build from source. - **File I/O is synchronous**: File writes may block the event loop on slow disks. Use batching to mitigate. - **Log loss on crash**: Buffered logs are lost if process crashes without calling `shutdown()`. - **Single config warning**: Logger only warns once if used before `setConfig()`, then silently discards logs. diff --git a/package-lock.json b/package-lock.json index 165ab8c..3699bcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,14 @@ { "name": "eventum", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "eventum", - "version": "0.1.0-alpha.3", - "cpu": [ - "x64", - "arm64" - ], + "version": "0.1.0-alpha.4", + "hasInstallScript": true, "license": "MIT", - "os": [ - "darwin", - "linux", - "win32" - ], "dependencies": { "file-uri-to-path": "^1.0.0" }, @@ -31,14 +23,12 @@ "node": ">=18.0.0" }, "optionalDependencies": { - "eventum-darwin-arm64": "0.1.0-alpha.3", - "eventum-darwin-x64": "0.1.0-alpha.3", - "eventum-linux-arm64-gnu": "0.1.0-alpha.3", - "eventum-linux-arm64-musl": "0.1.0-alpha.3", - "eventum-linux-x64-gnu": "0.1.0-alpha.3", - "eventum-linux-x64-musl": "0.1.0-alpha.3", - "eventum-win32-arm64": "0.1.0-alpha.3", - "eventum-win32-x64": "0.1.0-alpha.3" + "eventum-darwin-arm64": "0.1.0-alpha.4", + "eventum-darwin-x64": "0.1.0-alpha.4", + "eventum-linux-arm64-gnu": "0.1.0-alpha.4", + "eventum-linux-arm64-musl": "0.1.0-alpha.4", + "eventum-linux-x64-gnu": "0.1.0-alpha.4", + "eventum-linux-x64-musl": "0.1.0-alpha.4" } }, "node_modules/@babel/helper-string-parser": { @@ -1231,12 +1221,6 @@ "node_modules/eventum-linux-x64-musl": { "optional": true }, - "node_modules/eventum-win32-arm64": { - "optional": true - }, - "node_modules/eventum-win32-x64": { - "optional": true - }, "node_modules/expect-type": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", diff --git a/package.json b/package.json index 28ee9e8..579691c 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,19 @@ { "name": "eventum", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "private": false, "description": "Ultra-fast, low-overhead logger for Node.js powered by Rust and napi-rs", "homepage": "https://github.com/dmytroPolhul/eventum#readme", "engines": { "node": ">=18.0.0" }, - "os": [ - "darwin", - "linux", - "win32" - ], - "cpu": [ - "x64", - "arm64" - ], "optionalDependencies": { - "eventum-darwin-arm64": "0.1.0-alpha.3", - "eventum-darwin-x64": "0.1.0-alpha.3", - "eventum-linux-arm64-gnu": "0.1.0-alpha.3", - "eventum-linux-arm64-musl": "0.1.0-alpha.3", - "eventum-linux-x64-gnu": "0.1.0-alpha.3", - "eventum-linux-x64-musl": "0.1.0-alpha.3", - "eventum-win32-arm64": "0.1.0-alpha.3", - "eventum-win32-x64": "0.1.0-alpha.3" + "eventum-darwin-arm64": "0.1.0-alpha.4", + "eventum-darwin-x64": "0.1.0-alpha.4", + "eventum-linux-arm64-gnu": "0.1.0-alpha.4", + "eventum-linux-arm64-musl": "0.1.0-alpha.4", + "eventum-linux-x64-gnu": "0.1.0-alpha.4", + "eventum-linux-x64-musl": "0.1.0-alpha.4" }, "bugs": { "url": "https://github.com/dmytroPolhul/eventum/issues" @@ -51,7 +40,8 @@ "test:coverage": "vitest run --coverage", "build": "napi build --release", "prepublishOnly": "npm run build", - "bench": "node benchmarks/compare-targets-bench.js" + "bench": "node benchmarks/compare-targets-bench.js", + "postinstall": "node scripts/postinstall.cjs" }, "napi": { "name": "eventum", @@ -65,8 +55,6 @@ "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl", - "x86_64-pc-windows-msvc", - "aarch64-pc-windows-msvc", "x86_64-apple-darwin", "aarch64-apple-darwin" ] @@ -78,7 +66,12 @@ "index.d.ts", "README.md", "LICENSE", - "examples/images/" + "scripts/", + "examples/images/", + "Cargo.toml", + "Cargo.lock", + "build.rs", + "src" ], "keywords": [ "logger", @@ -102,4 +95,4 @@ "node-addon-api": "^8.3.1", "vitest": "^4.0.17" } -} +} \ No newline at end of file diff --git a/scripts/postinstall.cjs b/scripts/postinstall.cjs new file mode 100644 index 0000000..6526996 --- /dev/null +++ b/scripts/postinstall.cjs @@ -0,0 +1,7 @@ +const { platform } = require('os') +const { execSync } = require('child_process') + +if (platform() === 'win32') { + console.log('[eventum] Building native module from source for Windows...') + execSync('npx --yes @napi-rs/cli build --release', { stdio: 'inherit' }) +}