Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking 0.2 changes plan #8

Closed
12 tasks done
svartalf opened this issue Nov 3, 2019 · 2 comments
Closed
12 tasks done

Breaking 0.2 changes plan #8

svartalf opened this issue Nov 3, 2019 · 2 comments
Milestone

Comments

@svartalf
Copy link
Owner

svartalf commented Nov 3, 2019

Since this crate is not abandoned anymore (yay!), it is time to make it a bit more modern and plan changes for the next 0.2 version.

  • Determine minimal supported Rust version — (set to 1.19.0)
  • Gather list of the supported OSes
  • Add CI builds (how to test Redox and various *nix'es?) — Linux, macOS and Windows are enabled already
  • Deprecate the get_hostname function
  • Add get() -> io::Result<OsString> function
  • Add set<T>(hostname: T) -> io::Result<()> where T: Into<OsStr> function (determine what exactly T should be)
  • Replace winutil dependency with the winapi crate
  • Use gethostname from the libc crate instead of bundled version
  • Add keywords, categories and badges seasoning to the Cargo manifest
  • Add more documentation and examples
  • Review API guidelines and make the public API great
  • Address the Avoidable, potential unsafety #6 issue
@svartalf svartalf added this to the 0.2 milestone Nov 3, 2019
@svartalf
Copy link
Owner Author

svartalf commented Nov 3, 2019

There is a linker bug with 1.13.0 build for Windows, happens because of rust-lang/rust#38584
As bumping to 1.19.0 seems to be unreasonable, CI should be fixed instead with any workaround provided.

Temporary bumped to 1.19.0, it can be addressed later.

@svartalf svartalf pinned this issue Nov 3, 2019
@svartalf
Copy link
Owner Author

svartalf commented Nov 8, 2019

How does get works for other languages/libraries:

Python Golang NodeJS (via libuv)
*nix gethostname gethostname
Windows GetComputerNameExW(ComputerNamePhysicalDnsHostname) GetComputerNameExW(ComputerNamePhysicalDnsHostname) gethostname
AIX uname
darwin sysctl("kern.hostname")
DragonFly/FreeBSD sysctl("kern.hostname")
NetBSD sysctl("kern.hostname")
OpenBSD sysctl("kern.hostname")
Linux uname + /proc/sys/kernel/hostname
Android uname
Solaris gethostname

@svartalf svartalf closed this as completed Nov 9, 2019
@svartalf svartalf unpinned this issue Nov 27, 2019
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

No branches or pull requests

1 participant