dna 0.0.1 copy "dna: ^0.0.1" to clipboard
dna: ^0.0.1 copied to clipboard

outdatedDart 1 only

Dart Native Access.

example/dna_example.dart

// Copyright (c) 2016, root ext. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:dna/dna.dart';

main() {
  var pid = getpid();
  print('pid ${pid}');
}

int getpid(){
  var library = nLoadLibrary('libc.so.6');
  var method = nFindSymbol(library, 'getpid');
  var vm = nCreateCallVM(256);
  var pid = nCallInt(vm, method);
  nFreeCallVM(vm);
  nFreeLibrary(library);
  return pid;
}
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Dart Native Access.

Homepage

License

unknown (LICENSE)

More

Packages that depend on dna