Skip to content

External ABI by-value parameter can't be demodedΒ #3625

Description

@brson

std::net::tcp has crust functions like

extern fn on_tcp_read_cb(stream: *uv::ll::uv_stream_t,                                                                                                                        
                    nread: libc::ssize_t,                                                                                                                                     
                    ++buf: uv::ll::uv_buf_t) unsafe { 

I can't figure out a way to make that ++buf argument go away.

Activity

  1. nikomatsakis commented on Oct 1, 2012

    @nikomatsakis
    Contributor

    Yes, right now + mode is not necessarily following the C ABI. My "master plan" for this was that extern "C" fns would follow C's ABI precisely, whereas Rust ones might not... though perhaps it'd be easier to just make everything follow C ABI.

  2. added a commit that references this issue on May 26, 2024
  3. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binaries

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions