summary refs log tree commit diff stats
path: root/lib/genode/env.nim
blob: 2b180d1b3bfa05ee4dcd8ced8a9b868f96cd916f (plain) (blame)
1
2
3
4
5
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { c
#
#
#            Nim's Runtime Library
#        (c) Copyright 2018 Emery Hemingway
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

#
# This file contains the minimum required definitions
# for interacting with the initial Genode environment.
# It is reserved for use only within the standard
# library. See ``componentConstructHook`` in the system
# module for accessing the Genode environment after the
# standard library has finished initializating.
#

when not defined(genode):
  {.error: "Genode only include".}

type
  GenodeEnvObj {.importcpp: "Genode::Env", header: "<base/env.h>", pure.} = object
  GenodeEnvPtr = ptr GenodeEnvObj

const runtimeEnvSym = "nim_runtime_env"

when not defined(nimscript):
  var runtimeEnv {.importcpp: runtimeEnvSym.}: GenodeEnvPtr