From owner-freebsd-questions@freebsd.org Tue Jan 15 12:42:19 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CBEF14897AD for ; Tue, 15 Jan 2019 12:42:19 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 827E585F21 for ; Tue, 15 Jan 2019 12:42:18 +0000 (UTC) (envelope-from 4250.10.freebsd-questions=freebsd.org@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1547556138; x=1550148138; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info; bh=SmpN+0nrIct462nif8kqB+UFIeRmOeJV4EsGyYe7Sks=; b=o67M27/KJp/lEJ5tZbygXpDDpXs8ITzmKl7oft5RzsqZG0yJmODKd0CrkpCY+MM9G1AQplO4JVgctHDLp+ye5iLJF5q3+/eS0qWFNYT7ELPY255dSZQT5TReN1yUTDfH0oST2FKnyxLWmTUwzYVSzn4SXQxtLA8Yapagic49sKc= X-Thread-Info: NDI1MC4xMi4xYTMwMDAwMDA2ZTExMDMuZnJlZWJzZC1xdWVzdGlvbnM9ZnJlZWJzZC5vcmc= Received: from r3.us-east.aws.in.socketlabs.com (r3.us-east.aws.in.socketlabs.com [54.165.229.15]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Tue, 15 Jan 2019 06:42:06 -0500 Received: from smtp.lan.sohara.org (EMTPY [89.127.62.20]) by r3.us-east.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Tue, 15 Jan 2019 06:42:05 -0500 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gjN6a-000MJH-2I; Tue, 15 Jan 2019 11:42:04 +0000 Date: Tue, 15 Jan 2019 11:42:03 +0000 From: Steve O'Hara-Smith To: iam@sdf.org Cc: freebsd-questions@freebsd.org Subject: Re: what is libc? Message-Id: <20190115114203.be3a720eca52bd5970b8541d@sohara.org> In-Reply-To: <201901151033.x0FAXCeg027256@sdf.org> References: <201901151033.x0FAXCeg027256@sdf.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) X-Clacks-Overhead: "GNU Terry Pratchett" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 827E585F21 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=o67M27/K; spf=pass (mx1.freebsd.org: domain of 4250.10.freebsd-questions=freebsd.org@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.10.freebsd-questions=freebsd.org@email-od.com X-Spamd-Result: default: False [-0.72 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[email-od.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[mxbh.socketlabs.com,mxbsg.socketlabs.com]; FORGED_SENDER(0.00)[steve@sohara.org,4250.10.freebsd-questions=freebsd.org@email-od.com]; IP_SCORE(-0.23)[ip: (-0.57), ipnet: 142.0.176.0/22(-0.28), asn: 7381(-0.22), country: US(-0.08)]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.10.freebsd-questions=freebsd.org@email-od.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.970,0]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.47)[0.470,0]; NEURAL_HAM_LONG(-0.99)[-0.985,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sohara.org]; FORGED_SENDER_VERP_SRS(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[198.176.0.142.list.dnswl.org : 127.0.15.0]; ENVFROM_VERP(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 12:42:19 -0000 On Tue, 15 Jan 2019 10:33:12 GMT iam@sdf.org wrote: > also, if suppose the userland were to be written in say "rust", > would it theoretically be possible to write libc in "rust", and > then would it have to be called "librust"? Just to extend Polytropon's excellent response a little. The lowest level interface to the system in any kind of Unix is the kernel interface. It is possible to create a higher level interface analogous but not necessarily compatible in any way with libc in any language which is capable of implementing the kernel interface. I don't know of any examples though, it is far easier and more portable to sit on top of the documented and system independent standards implemented in libc than to sit directly on top of the kernel interface which is unique to each implementation in at least some aspects. -- Steve O'Hara-Smith