specification VS winapi-rs

Compare specification vs winapi-rs and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
specification winapi-rs
18 14
386 1,795
0.5% -
8.0 0.0
1 day ago 10 months ago
Python Rust
- Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

specification

Posts with mentions or reviews of specification. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-05.
  • Improving Interoperability Between Rust and C++
    7 projects | news.ycombinator.com | 5 Feb 2024
    Many people misunderstand how software is written in regulated industries, and assume that a standard is necessary. In practice, this is not the case. Note that Ferrocene[1] had to produce a specification[2] in order to qualify the compiler. But there isn't a requirement that it must be a standard in any way, only that it describes how the Ferrocene compiler works. Nor that it be accepted by upstream.

    1: https://ferrous-systems.com/blog/officially-qualified-ferroc...

    2: https://github.com/ferrocene/specification

  • Aerugo – RTOS for aerospace uses written in Rust
    3 projects | news.ycombinator.com | 31 Jan 2024
    If by "no standard" you mean that there is no language specification for rust, then there is no standard. However, a language specification is not sufficient to verify program correctness, nor is it required.

    A standard may (and the C standard for example does) leave parts of the behavior as "implementation specific" and there's quite a few edge cases - and that's not even talking about "undefined behavior", of which there is plenty. An even in the behavior that is neither implementation specific nor undefined you'll find enough rope to hang yourself (all the beautiful pointers).

    On the other hand, the rust language - while having no formal spec - is fairly well described, in the form of its RFCs and testsuite. We (the ferrocene team) were able to derive a descriptive specification from the existing description fairly easily. So while there is no ISO standard, and no spec that would be sufficient to write a competing implementation, there is a description of what the language behaves like. You can read up on it at https://spec.ferrocene.dev/

    As for verification of correct behavior of such a program, you can employ a host of different techniques depending on what your requirements are - down to verification of the produced bytecode by means of blackbox testing or other.

  • Progress toward a GCC-based Rust compiler
    8 projects | news.ycombinator.com | 18 Dec 2023
    They created a specification for Ferrocene because Rust does not yet have a language standard:

    https://spec.ferrocene.dev/

    >> But does the language need a standard?

    Yes, Rust needs a standard.

    >> And if so, then for what purpose?

    For the same purpose that all standards have--to formally define it in writing.

    Ferrocene's web site (https://ferrous-systems.com/ferrocene/) shows that it meets the ISO 26262 standard (https://en.wikipedia.org/wiki/ISO_26262).

    Why does ISO 26262 matter? What purpose does it serve? Couldn't a vehicle manufacturer just say "our vehicles are safe"? Which would you trust more: a vehicle that is verified to meet ISO 26262 standards, or a vehicle whose manufacturer tells you "it's safe"?

  • Officially Qualified – Ferrocene
    2 projects | news.ycombinator.com | 8 Nov 2023
    https://github.com/ferrocene/specification

    They do say any differences between it and upstream behavior or documentation is a defect in the spec, not upstream. So it isn't authoritative. Unless we all decide it is.

  • A Guide to Undefined Behavior in C and C++
    9 projects | news.ycombinator.com | 17 Aug 2023
    >> The spec does not define the software. The software is as the software does. Having or not having a spec doesn't protect from bugs - people do.

    >> What you're taking about is covering one's ass, not specification.

    They are related.

    In safety-critical software, bugs can cause people to die. Without a spec, no one will use Rust for safety critical software. It would be too risky and no company would accept that level of risk.

    For example if software that controls an airplane is written in Rust and an error occurs during flight, what happens? The software can't just panic and crash or the airplane might crash.

    The Ferrocene project (https://ferrous-systems.com/ferrocene/) is working on producing a safety-critical Rust specification (https://github.com/ferrocene/specification) because having a language specification matters for safety-critical work.

  • A Decade of Rust, and Announcing Ferrocene
    1 project | news.ycombinator.com | 19 Jul 2023
    I'd like to clarify a little here: There's an ISO certifiation in here - but it's not an ISO standard for the language.

    Essentially, the ISO 26262 certification verifies that the compiler release process conforms to a certain standard. It does not create an ISO standard for rust, not does it aim to. At part of the certification process we had to write a spec for the rust language, but it is a descriptive spec of how certain aspects of the rust language behave for one specific release of the compiler.

    The certification builds on this to ensure that tests catch deviations from the spec, known problems are documented etc. So rust as a language is unaffected, as is the rust project. The spec is open source and might be useful to others, you can find it at https://spec.ferrocene.dev/

    The target sectors for ISO 26262 and related industrial certification are clearly sectors that require such certification: automotive, medical, etc.

    Ferrocene itself however, is not only the ISO certified downstream of the rust compiler, it also offers for example long term support and tracking of known issues which the rust project does not provide. This is also important for certain applications that do not strictly require certifications.

  • Ferrocene Language Specification
    1 project | news.ycombinator.com | 30 May 2023
  • Rust has been forked to the Crab Language
    8 projects | news.ycombinator.com | 30 May 2023
    >> Rust is defined by the implementation.

    Hopefully not for long:

    https://github.com/ferrocene/specification

    https://ferrous-systems.com/blog/the-ferrocene-language-spec...

    Hopefully Ferrocene can lead to Rust itself being standardized.

    To me, it seems inevitable that there will be multiple implementations of Rust, especially if Rust continues to be more widely adopted and used in new domains.

    I would also not be surprised if Rust were to adopt optional language extensions for specialized use cases, similar to Ada's language annexes:

    http://www.ada-auth.org/standards/22rm/html/RM-1-1-2.html

    Why? Because the Rust implementation you use for video game programming does not need all of the same features as the Rust implementation that you use for safety-critical embedded systems (for example: railroad control software).

  • GCC 13 and the state of gccrs
    4 projects | /r/rust | 25 Apr 2023
    That’s an easy enough problem to solve (though time consuming), and Ferrocene is working on it. Having >1 compiler implement the spec is just a human fuzz test that finds edge cases, and that’s a good thing.
  • Rust in Automotive
    2 projects | /r/rust | 26 Mar 2023
    I don't know what ISO-26262 requires, but for IEC-61508 only requires "The language should be fully and unambiguously defined." - which I think Ferrocene has taken a decent stab at with https://spec.ferrocene.dev , and an accompanying ISO standard is not a hard requirement.

winapi-rs

Posts with mentions or reviews of winapi-rs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-05.
  • Improving Interoperability Between Rust and C++
    7 projects | news.ycombinator.com | 5 Feb 2024
    Vtables are pretty solved as well. I do a lot of Windows COM interop. Using the `windows` crate, vtables for COM interfaces are relegated to an implementation detail - instead you simply implement a (typically safe!) trait:

    https://microsoft.github.io/windows-docs-rs/doc/windows/Win3...

    Which can then be converted to a refcounted smart pointer:

    https://microsoft.github.io/windows-docs-rs/doc/windows/Win3...

    All driven by win32 sdk parsing and metadata.

    But suppose we want to roll our own, because we tend to prefer `winapi` but it lacks definition. That's not too terrible either:

    • https://github.com/MaulingMonkey/thindx-xaudio2/blob/master/...

    • https://github.com/MaulingMonkey/thindx-xaudio2/blob/master/...

    • https://github.com/MaulingMonkey/thindx-xaudio2/blob/master/...

    I could more heavily lean on my macros ala `windows`, but I went the route of manual control for better doc comments, more explicit control of thread safety traits to match the existing C++ codebase, etc.

    Is there some pointer casting? Yes. Is it annoying or likely to be what breaks? No. What is annoying?

    • Stacked borrows and narrowing spatial provenance ( https://github.com/retep998/winapi-rs/issues/1025 - this can be "solved" by sticking to pointers ala `windows`, or by choosing a different provenance model like rustc might be doing?)

    • Guarding against panics unwinding over an FFI boundary. This is at least being worked on, but remains unfinished ( https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html )

    • Edge case ABI weirdness specific to C++ methods ( https://devblogs.microsoft.com/oldnewthing/20220113-00/?p=10... , https://github.com/retep998/winapi-rs/issues/523 )

  • Trying to compile rust library on Windows
    4 projects | /r/rust | 1 Apr 2023
    Is winapi = { version = "0.3.9", features = ["winuser"] } in [target.'cfg(windows)'.dependencies]? All the missing symbols are functions in module winapi::um::wincrypt (see https://docs.rs/winapi/0.3.9/winapi/um/wincrypt/index.html#functions ) and the crate's Git repo at https://github.com/retep998/winapi-rs contains all the import libs and export defs for the corresponding DLLs in directory x86_64. As crypt32.dll ships with windows by default, I think this is all that would be needed for building on a windows PC.
  • I seen people say that () is similar to void in C. But what is similar to void*?
    1 project | /r/rust | 27 Mar 2023
    The std library provides the type c_void for FFI, which is an enum with two variants. Some libraries have their own version, winapi for example defines c_void as an enum with no variants, making it identical to !. Finally, whenever the std needs a pointer with no particular type, they tend to reach for *const (), see ptr::to_raw_parts.
  • Kernel Headers for Windows could soon make it into windows-rs
    5 projects | /r/rust | 22 Feb 2023
    This would be a community driven project for now but I have high hopes considering we already had projects like winapi and Trantect/winapi-rs.
  • More malware is shifting to Rust
    4 projects | /r/rust | 29 Jan 2022
    Can't you choose to control what OS APIs you use if you use crates such as libc and winapi, or just directly using extern "C" { ... }/extern "system" { ... }, or even inline assembly for syscalls with llvm_asm! or asm!?
  • Noob question - Can I see what my used cargo crate has inside?
    1 project | /r/rust | 4 Aug 2021
  • Building Outer Wonders, our Rust/SDL2 puzzle game, for Windows
    1 project | /r/rust | 21 Jun 2021
    Thank you! For SDL2 access, we're using custom bindings over the sdl2-sys crate, along with custom bindings for OpenGL and Vulkan access, and the winapi crate for Direct3D 11 access (as well as access to a few Windows APIs).
  • Hey Rustaceans! Got an easy question? Ask here (23/2021)!
    3 projects | /r/rust | 7 Jun 2021
    What is the difference between the winapi crate and the windows crate? Are they the same thing, and is one better than the other?
  • The playable demo of Outer Wonders, our cute, colorful and Rust-powered puzzle game, is live on itch.io for Windows and Linux! Thank you Rust community for creating such awesome tools!
    5 projects | /r/rust | 24 Apr 2021
    Turns out OpenGL and Vulkan sometimes behave weirdly on Windows machines (some OpenGL drivers use a huge amount of CPU power and create unexpected sync points; I also ran into this very weird driver crash while testing our Vulkan-powered version of Outer Wonders which is scary), so we implemented Direct3D 11 support using the winapi crate, which was much of a relief (D3D11 is an ideal rendering API when it comes to supporting Windows because it allows you target hardware with Windows versions going as far back as Vista, and from my experience, Direct3D drivers have a more consistent and reliable behavior). We didn't have to bring significant changes to our abstraction layer to add Direct3D 11 support.
  • Official WinRT+Win32 Crate for Rust
    1 project | news.ycombinator.com | 5 Mar 2021

What are some alternatives?

When comparing specification and winapi-rs you can also consider the following projects:

bc - An implementation of the POSIX bc calculator with GNU extensions and dc, moved away from GitHub. Finished, but well-maintained.

windows-rs - Rust for Windows

stc - Speedy TypeScript type checker

rust-windows-dll - Macro for dynamically loading windows dll functions

crab - A community fork of a language named after a plant fungus. All of the memory-safe features you love, now with 100% less bureaucracy!

rand - A Rust library for random number generation.

polonius - Defines the Rust borrow checker.

core-foundation-rs - Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS

rust-sdl2 - SDL2 bindings for Rust

compiler-team - A home for compiler team planning documents, meeting minutes, and other such things.

sys-mount - High level FFI binding around the sys mount & umount2 calls, for Rust