add milestones to readme

This commit is contained in:
2026-07-05 12:36:36 -03:00
parent d4dd7c268c
commit f63de56147
2 changed files with 37 additions and 7 deletions

View File

@@ -2,3 +2,33 @@
NeoNucleus JNI bindings.
### Dev Setup Notes
Java expects libcarbon.so on the src/native directory. This is the default unless you're not using the Makefile. Make *sure* to build NeoNucleus with `make lib MODE=release`, and place the libneonucleus.a on src/native. The same applies for TLA (testLuaArch), which must be built with `make MODE=release`.
### Development
Carbon is currently being organized in "milestones", below they are.
#### Milestone 1
- [x] PointerBackedClass
- [x] testLuaArch included
- [x] Statically linked NeoNucleus
- [x] Null pointer checks
- [x] Lua error in console
#### Milestone 2
- [ ] On-demand native structs
- [ ] NativeComponent, and java-defined Component(s)
- [ ] Make nn_EEPROM *not* PBC'd.
- [ ] JNIComponentHandler
- [ ] JNI Environment handler
- [ ] Java-side userdata fields
- [ ] Implement ncl screen
- [ ] Prevent more footguns (more error handling, etc...)
#### Milestone 3
- [ ] Implement all base nn_* functions
- [ ] Implement all ncl_* functions
- [ ] Custom Java architectures (JNI architecture handler)
- [ ] Auto-generate native structs in Java from a JSON file (?)
- [ ] Boot OpenOS
### Milestone 4 (MVP release?)
- [ ] OS tests
- [ ] Carbon C library
- [ ] Fix/add missing javadoc comments
- [ ] Point Makefile to the submodule's files instead of copying them over (for NeoNucleus)
- [ ] Write a working emulator using Carbon *or* Hydrogen (NC-Telnet?)
- [ ] Begin work on Hydrogen

View File

@@ -46,10 +46,10 @@ void* Carbon::PointerBacked::GetPointer(JNIEnv * env, jobject obj) {
return (void*) ptr;
}
bool Carbon::PointerBacked::ResetPointer(JNIEnv * env, jobject obj) {
jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "ptr", "J");
if (id == NULL) return false;
env->SetLongField(obj, id, (jlong) NULL);
return true;
jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "ptr", "J");
if (id == NULL) return false;
env->SetLongField(obj, id, (jlong) NULL);
return true;
}
nn_Exit Carbon::archRequestHandler(nn_ArchitectureRequest *req) {
GlobalArchState* gstate = (GlobalArchState*)req->globalState;
@@ -121,13 +121,13 @@ jobject Carbon::Map::To_nn_ComputerState(JNIEnv* env, nn_ComputerState a) {
return NULL;
}
nn_ComputerState Carbon::Map::From_nn_ComputerState(JNIEnv* env, jobject a) {
jclass clazz = env->FindClass(CARBON_CLASSPATH("nn_ComputerState"));
jclass clazz = env->FindClass(CARBON_CLASSPATH(nn_ComputerState));
jmethodID ordMID = env->GetMethodID(clazz, "ordinal", "()I");
jint value = env->CallIntMethod(a, ordMID);
return (nn_ComputerState) value;
}
jobject Carbon::Map::To_nn_Architecture(JNIEnv* env, nn_Architecture a) {
jclass clazz = env->FindClass("org/neoflock/NeoNucleus/nn_Architecture");
jclass clazz = env->FindClass(CARBON_CLASSPATH(nn_Architecture));
jmethodID consMID = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;)V");
jstring str = env->NewStringUTF(a.name);
jobject obj = env->NewObject(clazz, consMID, str);