
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
-- import "vimagination.zapto.org/rwcount"
Package rwcount implements a simple counter that wraps an io.Reader or io.Writer.
Useful for functions (like binary.Read/Write) which do not return read/write counts.
io.Reader or io.Writer.package main
import (
"bytes"
"encoding/binary"
"fmt"
"vimagination.zapto.org/rwcount"
)
func main() {
var (
buf bytes.Buffer
result uint16
)
writer := &rwcount.Writer{Writer: &buf}
binary.Write(writer, binary.LittleEndian, uint16(1234))
reader := &rwcount.Reader{Reader: &buf}
binary.Read(reader, binary.LittleEndian, &result)
fmt.Printf("Wrote bytes: %d\n"+
"Write error: %v\n"+
"Read bytes: %d\n"+
"Read error: %v\n"+
"Read value: %d\n",
writer.Count,
writer.Err,
reader.Count,
reader.Err,
result,
)
// Output:
// Wrote bytes: 2
// Write error: <nil>
// Read bytes: 2
// Read error: <nil>
// Read value: 1234
}
Full API docs can be found at:
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.