libc 0.0.4 copy "libc: ^0.0.4" to clipboard
libc: ^0.0.4 copied to clipboard

outdatedDart 1 only

The C standard library wrapper (currently only header files) for the "binary interop" and "binary types".

example/example.dart

import "package:binary_interop/binary_interop.dart";
import "package:libc/headers.dart";

void main() {
  var header = HEADERS.keys.first;
  var types = new BinaryTypes();
  var helper = new BinaryTypeHelper(types);
  helper.addHeaders(LIBC_HEADERS);
  helper.addHeaders(HEADERS);
  // "libc/example/header.h"
  helper.declare(header);
  var prototypes = helper.prototypes;
  for (var name in prototypes.keys) {
    var prototype = prototypes[name];
    if (prototype.filename == header) {
      print(prototype.type.name);
    }
  }
}

const Map<String, String> HEADERS = const <String, String>{"libc/example/header.h": _HEADER_H};

const String _HEADER_H = """
#include <stdio.h>

FILE * myfunc(const char * name);
""";
0
likes
0
pub points
1%
popularity

Publisher

unverified uploader

The C standard library wrapper (currently only header files) for the "binary interop" and "binary types".

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

binary_interop

More

Packages that depend on libc