mirror of https://github.com/ospab/ostp.git
fix: use portable-atomic for AtomicU64 on 32-bit targets (MIPS, ARM32)
This commit is contained in:
parent
05583e189e
commit
3e6baf5a06
|
|
@ -926,7 +926,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
|||
|
||||
[[package]]
|
||||
name = "ostp"
|
||||
version = "0.1.70"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
|
|
@ -945,7 +945,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ostp-client"
|
||||
version = "0.1.70"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
|
@ -963,7 +963,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ostp-core"
|
||||
version = "0.1.70"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
|
@ -994,12 +994,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ostp-server"
|
||||
version = "0.1.70"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
"bytes",
|
||||
"ostp-core",
|
||||
"portable-atomic",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
|
@ -1011,7 +1012,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ostp-tun-helper"
|
||||
version = "0.1.70"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -16,3 +16,4 @@ rand.workspace = true
|
|||
socket2 = "0.6.3"
|
||||
axum = "0.8"
|
||||
tower-http = { version = "0.6", features = ["cors"] }
|
||||
portable-atomic.workspace = true
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::atomic::Ordering;
|
||||
use portable_atomic::AtomicU64;
|
||||
use std::time::Instant;
|
||||
|
||||
use axum::{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ use ostp_core::{OstpEvent, ProtocolAction, ProtocolConfig, ProtocolMachine};
|
|||
use std::collections::HashMap;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::atomic::Ordering;
|
||||
use portable_atomic::AtomicU64;
|
||||
|
||||
/// Maximum number of concurrent authenticated sessions.
|
||||
/// Excess handshake attempts are silently dropped -- no response, no state allocated.
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit cd3d7d8dae142112d58bc216777b77a2ded83b4e
|
||||
|
|
@ -19,18 +19,25 @@ Write-Output "Synchronizing with origin master..."
|
|||
|
||||
# --- Version bump ---
|
||||
$CargoToml = Join-Path $ProjectRoot "Cargo.toml"
|
||||
$Version = "0.1.0"
|
||||
$Version = "0.2.0"
|
||||
if (Test-Path $CargoToml) {
|
||||
$Content = [System.IO.File]::ReadAllText($CargoToml)
|
||||
if ($Content -match 'version\s*=\s*"(\d+)\.(\d+)\.(\d+)"') {
|
||||
# Match version only in [workspace.package] section (first occurrence)
|
||||
if ($Content -match '\[workspace\.package\][\s\S]*?version\s*=\s*"(\d+)\.(\d+)\.(\d+)"') {
|
||||
$Major = [int]$Matches[1]
|
||||
$Minor = [int]$Matches[2]
|
||||
$Patch = [int]$Matches[3]
|
||||
$NewPatch = $Patch + 1
|
||||
$Version = "{0}.{1}.{2}" -f $Major, $Minor, $NewPatch
|
||||
# Replace only the workspace version line, not dependency versions
|
||||
$OldVersionStr = 'version = "{0}.{1}.{2}"' -f $Major, $Minor, $Patch
|
||||
$NewVersionStr = 'version = "' + $Version + '"'
|
||||
$NewContent = $Content -replace 'version\s*=\s*"\d+\.\d+\.\d+"', $NewVersionStr
|
||||
[System.IO.File]::WriteAllText($CargoToml, $NewContent)
|
||||
# Use .NET Replace to swap only the first occurrence
|
||||
$idx = $Content.IndexOf($OldVersionStr)
|
||||
if ($idx -ge 0) {
|
||||
$NewContent = $Content.Remove($idx, $OldVersionStr.Length).Insert($idx, $NewVersionStr)
|
||||
[System.IO.File]::WriteAllText($CargoToml, $NewContent)
|
||||
}
|
||||
Write-Output "[ok] Version: v$Version"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue