GithubHelp home page GithubHelp logo

ldc-developers / druntime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dlang/druntime

30.0 18.0 29.0 23.82 MB

LDC implementation of the D low-level runtime library. ARCHIVED like the upstream repo; now in the LDC repo directly: https://github.com/ldc-developers/ldc/tree/master/runtime/druntime

License: Boost Software License 1.0

D 98.55% Makefile 0.82% C 0.15% Assembly 0.32% R 0.04% Shell 0.05% C++ 0.07% Batchfile 0.01%

druntime's Introduction

DRuntime: Runtime Library for the D Programming Language

GitHub tag Bugzilla Issues CircleCI Buildkite Code coverage license

This is DRuntime. It is the low-level runtime library backing the D programming language.

DRuntime is typically linked together with Phobos in a release such that the compiler only has to link to a single library to provide the user with the runtime and the standard library.

Purpose

DRuntime is meant to be an abstraction layer above the compiler. Different compilers will likely have their own versions of DRuntime. While the implementations may differ, the interfaces should be the same.

Features

The runtime library provides the following:

  • The Object class, the root of the class hierarchy.
  • Implementations of array operations.
  • The associative array implementation.
  • Type information and RTTI.
  • Common threading and fiber infrastructure.
  • Synchronization and coordination primitives.
  • Exception handling and stack tracing.
  • Garbage collection interface and implementation.
  • Program startup and shutdown routines.
  • Low-level math intrinsics and support code.
  • Interfaces to standard C99 functions and types.
  • Interfaces to operating system APIs.
  • Atomic load/store and binary operations.
  • CPU detection/identification for x86.
  • System-independent time/duration functionality.
  • D ABI demangling helpers.
  • Low-level bit operations/intrinsics.
  • Unit test, coverage, and trace support code.
  • Low-level helpers for compiler-inserted calls.

Source structure

In the src directory, there are core and rt packages.

The rt package contains implementations for compiler-inserted calls. You may not import rt.xxx outside of the rt package itself, since its source is not accessible once druntime is compiled; it isn't included in the druntime/import that ships with compiler releases. The compiler assumes these functions have a specific extern(C) signature, and expects them to be linked into the final binary. See for example: https://github.com/dlang/dmd/blob/master/src/dmd/backend/drtlsym.d

The core package is shipped with the compiler and has a stable API. It contains implementations for D features, but also some D conversions of header files from external libraries:

  • core/stdc - C standard library
  • core/stdcpp - C++ standard library
  • core/sys - operating system API

An exception to the public API is core.internal, which contains compiler hooks that are templates. Many hooks from rt use TypeInfo class parameters, providing run-time type information, but they are being replaced by template functions, using static type information: Replace Runtime Hooks with Templates

Since uninstantiated templates aren't compiled into the druntime binary, they can't be in rt. Symbols from core.internal can be publically imported from other core modules, but are not supposed to be imported or otherwise referenced by end user modules.

Issues

To report a bug or look up known issues with the runtime library, please visit the bug tracker.

Licensing

See the LICENSE.txt file for licensing information.

Building

See the wiki page for build instructions.

druntime's People

Contributors

9rnsr avatar alexrp avatar andralex avatar braddr avatar complexmath avatar cybershadow avatar denis-sh avatar dkorpel avatar dlang-bot avatar dmitryolshansky avatar dnadlinger avatar geod24 avatar ibuclaw avatar jinshil avatar jmdavis avatar joakim-noah avatar johanengelen avatar kinke avatar martinnowak avatar moonlightsentinel avatar n8sh avatar rainers avatar razvann7 avatar redstar avatar schveiguy avatar thewilsonator avatar turkeyman avatar walterbright avatar wilzbach avatar yebblies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.