Skip to content

release: v1.0.0 — rust-samp v3.0.0 migration and strict mode rewrite#1

Merged
NullSablex merged 2 commits into
masterfrom
v1.0.0
May 25, 2026
Merged

release: v1.0.0 — rust-samp v3.0.0 migration and strict mode rewrite#1
NullSablex merged 2 commits into
masterfrom
v1.0.0

Conversation

@NullSablex

Copy link
Copy Markdown
Owner

Major release rebuilding the plugin on top of NullSablex/rust-samp v3.0.0. The same .so/.dll now runs on SA-MP and on Open Multiplayer (native component when dropped into components/, legacy mode when declared under pawn.legacy_plugins in config.json).

  • Migrate the samp dependency from ZOTTCE/samp-rs to NullSablex/rust-samp v3.0.0; add the required [package.metadata.samp] uid.
  • Refactor into strict-typed modules: plugin.rs owns an EnvStore, natives live in natives.rs, EnvType is a real enum with TryFrom, DotenvError implements Display + Error, OnceLock global state removed.
  • Apply clean code passes: helpers for value parsing and buffer writes, inline format args, const fn where applicable, dotenv parser split into named helpers (parse_line, parse_value, strip_quoted, strip_inline_comment, strip_bom). cargo clippy and cargo clippy -- -W pedantic -W nursery clean.
  • Logger module mirrors mysql_samp: leveled output, banner, logs/env.log with timestamps. Startup no longer prints variable count.
  • Generate include/env_samp.inc from include/env_samp.inc.in at build time, exposing ENV_SAMP_VERSION pinned to CARGO_PKG_VERSION.
  • Switch license from GPL-3.0-only to AGPL-3.0-or-later.
  • Translate runtime messages, examples (examples/example.pwn, examples/env) and the README to en-US.
  • Replace MANUAL.md with a MkDocs Material site under docs/, published at env-samp.nullsablex.com via GitHub Pages.
  • Add CI workflows: rust.yml (build/test/clippy/fmt/audit/coverage), release.yml (tag/Cargo.toml gate, cross-build, auto-extracted changelog section, asset upload) and docs.yml (mkdocs --strict + Pages deploy).
  • Replace scripts/build.sh with scripts/build-linux.sh and scripts/build-windows.sh adapted from mysql_samp.
  • Move pawn/include/ to include/; rename src/log.rs to src/logger.rs and src/state.rs to src/store.rs.
  • Add CHANGELOG.md (1.0.0 entry) and archive the previous release under changelog/v0.x.md.
  • Harden .gitignore with sections for build, secrets, coverage, MkDocs local previews, editor/OS/AI scratch files.

Major release rebuilding the plugin on top of NullSablex/rust-samp
v3.0.0. The same .so/.dll now runs on SA-MP and on Open Multiplayer
(native component when dropped into components/, legacy mode when
declared under pawn.legacy_plugins in config.json).

- Migrate the samp dependency from ZOTTCE/samp-rs to NullSablex/rust-samp
  v3.0.0; add the required [package.metadata.samp] uid.
- Refactor into strict-typed modules: plugin.rs owns an EnvStore, natives
  live in natives.rs, EnvType is a real enum with TryFrom<i32>, DotenvError
  implements Display + Error, OnceLock global state removed.
- Apply clean code passes: helpers for value parsing and buffer writes,
  inline format args, const fn where applicable, dotenv parser split into
  named helpers (parse_line, parse_value, strip_quoted, strip_inline_comment,
  strip_bom). cargo clippy and cargo clippy -- -W pedantic -W nursery clean.
- Logger module mirrors mysql_samp: leveled output, banner, logs/env.log
  with timestamps. Startup no longer prints variable count.
- Generate include/env_samp.inc from include/env_samp.inc.in at build
  time, exposing ENV_SAMP_VERSION pinned to CARGO_PKG_VERSION.
- Switch license from GPL-3.0-only to AGPL-3.0-or-later.
- Translate runtime messages, examples (examples/example.pwn,
  examples/env) and the README to en-US.
- Replace MANUAL.md with a MkDocs Material site under docs/, published
  at env-samp.nullsablex.com via GitHub Pages.
- Add CI workflows: rust.yml (build/test/clippy/fmt/audit/coverage),
  release.yml (tag/Cargo.toml gate, cross-build, auto-extracted changelog
  section, asset upload) and docs.yml (mkdocs --strict + Pages deploy).
- Replace scripts/build.sh with scripts/build-linux.sh and
  scripts/build-windows.sh adapted from mysql_samp.
- Move pawn/include/ to include/; rename src/log.rs to src/logger.rs and
  src/state.rs to src/store.rs.
- Add CHANGELOG.md (1.0.0 entry) and archive the previous release under
  changelog/v0.x.md.
- Harden .gitignore with sections for build, secrets, coverage, MkDocs
  local previews, editor/OS/AI scratch files.
- Expand the Self::TooLarge destructuring in DotenvError::fmt onto
  multiple lines, matching the default rustfmt struct-pattern width.
- Collapse the Logger::warn call in resolve_env_type onto a single line.

`cargo fmt --all -- --check` is now clean, unblocking the fmt CI job.
@NullSablex NullSablex merged commit 0b53865 into master May 25, 2026
6 checks passed
@NullSablex NullSablex deleted the v1.0.0 branch May 25, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant